Brian Hogg
2014-05-21 13:39:56 UTC
Hi all,
I built in extra fields / meta boxes in the admin panel as part of a theme, and added extra submit buttons so users didn’t have to scroll all the way up to click Publish/Save. Since WP 3.9 there’s now a "stay/leave” popup appearing when the extra submit buttons are used and the description/title has been changed.
I’ve searched around the js a bit and am not seeing where the window.onbeforeunload function is being set, and setting window.onbeforeunload = null; when the extra submit buttons are clicked has no effect. The post does still save when “Leave this page” is selected in the popup. Is there another way to hook in and disable this stay/leave message?
Thanks!
Brian
---
brianhogg.com
905.966.1778
I built in extra fields / meta boxes in the admin panel as part of a theme, and added extra submit buttons so users didn’t have to scroll all the way up to click Publish/Save. Since WP 3.9 there’s now a "stay/leave” popup appearing when the extra submit buttons are used and the description/title has been changed.
I’ve searched around the js a bit and am not seeing where the window.onbeforeunload function is being set, and setting window.onbeforeunload = null; when the extra submit buttons are clicked has no effect. The post does still save when “Leave this page” is selected in the popup. Is there another way to hook in and disable this stay/leave message?
Thanks!
Brian
---
brianhogg.com
905.966.1778