Steps to reproduce:
- Go to a page
- Switch to Edit mode
- Switch to Read mode
- Go to a different page (e.g. "View history" or "Main Page")
Uncaught TypeError: Cannot call method 'getModel' of null
Version: unspecified
Severity: normal
Steps to reproduce:
Uncaught TypeError: Cannot call method 'getModel' of null
Version: unspecified
Severity: normal
Either onbeforeunload() needs logic that we might have already torn down the surface and not complain if that's happened, or we need to not clean up after switching from the Edit tab to the Read tab. :-)
Also:
Uncaught RangeError: Maximum call stack size exceeded
jQuery.extend.proxy.proxy
ve.init.mw.ViewPageTarget.onBeforeUnload
jQuery.extend.proxy.proxy
ve.init.mw.ViewPageTarget.onBeforeUnload
[..]
jQuery.extend.proxy.proxy
ve.init.mw.ViewPageTarget.onBeforeUnload
jQuery.extend.proxy.proxy
ve.init.mw.ViewPageTarget.onBeforeUnload
Resolved in I13a2f02d256937b7da3aca3ad3c3404bd8f31244 by checking that the surface object was still around before using it.