Last modified: 2014-07-03 09:33:16 UTC
Since shouldDelay true makes it use window.location.href (but the normal VE handler is not suppressed since this is not pre-edit), it will start loading the normal same-page VE way, then change pages anyway. This can be fixed by just setting shouldDelay false if isViewPage is true, since in that case the event can fire in parallel with VE setting up, without an artificial timeout or href navigation. This can be tested in Chromium: 1. Put a breakpoint on the window.location.href line in logLinkClick. 2. Check 'Preserve log' checked in the network panel. 3. Click a VE edit link. 3. Wait a bit, then let it proceed past the break. With the bug, the network panel will show it loading VE resources before the HTML page load starts.
Change 140331 had a related patch set uploaded by Phuedx: Prevent unnecessary VE page load https://gerrit.wikimedia.org/r/140331
Change 140331 merged by jenkins-bot: Prevent unnecessary VE page load https://gerrit.wikimedia.org/r/140331