Skip to content

Commit

Permalink
Merge pull request #18 from Azbury/modal-top
Browse files Browse the repository at this point in the history
Use top instead of offsetTop for modal as well
  • Loading branch information
eridolfi12 authored Feb 29, 2024
2 parents 57a5202 + e38b215 commit 765aaab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/handhold.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ export default class Handhold {
const modal = document.querySelector('.handhold-modal');
const modalTitle = modal.querySelector('.handhold-modal-title');
const modalContent = modal.querySelector('.handhold-modal-content');
const currentStepPos = this._currentStepElement.offsetTop;
const currentStepPos = this.getElementDimension(this._currentStepElement).top;

if (this._currentStepElement) {
const dimensions = this.getElementDimension(step.element);
Expand Down

0 comments on commit 765aaab

Please sign in to comment.