Restore the trigger for the resize and scroll events to onSwitch

This commit is contained in:
Behind The Math
2018-01-22 20:42:57 -05:00
parent 9845244948
commit 6000ad5620

View File

@@ -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: Wont autofocus fields that are inserted via JS.
// This behavior is incorrect. So if theres no current focus, autofocus
// the last field.