Skip to content

Commit

Permalink
Remove shepherd-target class when hidden
Browse files Browse the repository at this point in the history
Resolves #109
  • Loading branch information
RobbieTheWagner committed Jul 7, 2018
1 parent fad8108 commit 0284b08
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/js/shepherd.js
Original file line number Diff line number Diff line change
Expand Up @@ -409,9 +409,9 @@ class Step extends Evented {
this.popper.popper.style.top = '50%';
this.popper.popper.style.transform = 'translate(-50%, -50%)';
}

this.target = opts.element;
this.target.classList.add('shepherd-target');
this.target.classList.add('shepherd-enabled');
this.target.classList.add('shepherd-enabled', 'shepherd-target');
}

show() {
Expand Down Expand Up @@ -454,7 +454,7 @@ class Step extends Evented {
document.body.removeAttribute('data-shepherd-step');

if (this.target) {
this.target.classList.remove('shepherd-enabled');
this.target.classList.remove('shepherd-enabled', 'shepherd-target');
}

if (this.popper) {
Expand Down

0 comments on commit 0284b08

Please sign in to comment.