Page MenuHomePhabricator

With logLinkClick shouldDelay true, VE starts loading same-page before being forced to another page
Closed, ResolvedPublic

Description

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.
  4. 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.


Version: master
Severity: normal

Details

Reference
bz66236

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:19 AM
bzimport set Reference to bz66236.

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