https://bugzilla.wikimedia.org/show_bug.cgi?id=58116
Web browser: ---
Bug ID: 58116
Summary: [Preview] doesn't abort api requests in flight
Product: MediaWiki extensions
Version: master
Hardware: All
OS: All
Status: NEW
Severity: minor
Priority: Unprioritized
Component: Flow
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected]
Classification: Unclassified
Mobile Platform: ---
Parsoid was restarting and so [Preview] was slow and I clicked more than once.
I noticed in Firebug that the api requests continued, several were in flight to
preview the same post.
You can simulate this by adding
sleep( rand( 0, 10 ) );
to execute() in includes/api/ApiParsoidUtilsFlow.php
then click [Preview] multiple times, then click Cancel. All the preview
requests continue.
It would be less server and client, especially when Parsoid is slow, if
clicking Preview, Cancel, or Reply cancelled any existing api.post() request
for preview of the same post, if any. You save the jqXHR from api.post(), and
call abort() on it before sending the new one. (And in failure, check for
data.status = 'abort' before alerting.)
The good news is it seems the client waits for the last jqXHR to arrive, so you
never see a preview of an earlier state.
--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l