From 6000ad5620869cc596ec37dd4365769b92a87650 Mon Sep 17 00:00:00 2001 From: Behind The Math Date: Mon, 22 Jan 2018 20:42:57 -0500 Subject: [PATCH] Restore the trigger for the resize and scroll events to onSwitch --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 5bb7a4e..e8ca6e6 100644 --- a/index.js +++ b/index.js @@ -88,6 +88,8 @@ Pjax.prototype = { }, onSwitch: function() { + trigger(window, "resize scroll") + this.state.numPendingSwitches-- // debounce calls, so we only run this once after all switches are finished. @@ -219,8 +221,6 @@ Pjax.prototype = { }, afterAllSwitches: function() { - trigger(window, "resize scroll") - // FF bug: Won’t autofocus fields that are inserted via JS. // This behavior is incorrect. So if theres no current focus, autofocus // the last field.