Преглед изворни кода

disaptch scroll event after resetting scrollTop

Gildas пре 7 година
родитељ
комит
bcd55c437e
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      lib/lazy/web-lazy-loader-after.js

+ 2 - 1
lib/lazy/web-lazy-loader-after.js

@@ -18,7 +18,7 @@
  *   along with SingleFile.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-/* global window, requestAnimationFrame, scrollBy, Element, document */
+/* global window, requestAnimationFrame, scrollBy, Element, document, dispatchEvent, UIEvent */
 
 (() => {
 
@@ -32,6 +32,7 @@
 		clearTimeout(window._singleFile_timeoutScroll);
 		window._singleFile_timeoutScroll = null;
 		delete document.documentElement.scrollTop;
+		dispatchEvent(new UIEvent("scroll"));
 	}
 
 })();