Skip to content

Commit f8419cc

Browse files
committed
Fixed IE 11 pushpin bug
1 parent d683798 commit f8419cc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

js/pushpin.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@
8989
!this.el.classList.contains('pinned')
9090
) {
9191
this._removePinClasses();
92-
9392
this.el.style.top = `${this.options.offset}px`;
9493
this.el.classList.add('pinned');
9594

@@ -125,7 +124,10 @@
125124
}
126125

127126
_removePinClasses() {
128-
this.el.classList.remove('pin-top', 'pinned', 'pin-bottom');
127+
// IE 11 bug (can't remove multiple classes in one line)
128+
this.el.classList.remove('pin-top');
129+
this.el.classList.remove('pinned');
130+
this.el.classList.remove('pin-bottom');
129131
}
130132
}
131133

0 commit comments

Comments
 (0)