Skip to content

Commit

Permalink
use top instead of offsetTop
Browse files Browse the repository at this point in the history
  • Loading branch information
Azbury committed Feb 29, 2024
1 parent 57a5202 commit e38b215
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 e38b215

Please sign in to comment.