launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #05158
[Merge] lp:~rvb/launchpad/longpoll-cursor into lp:launchpad
Raphaël Victor Badin has proposed merging lp:~rvb/launchpad/longpoll-cursor into lp:launchpad.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~rvb/launchpad/longpoll-cursor/+merge/77914
In Chrome and in Safari, the 'busy' cursor stays until all the requests started before the "page loaded" event finish. This is obviously a problem with the long poll request so we need to use a little trick to trigger the request *after* the page has loaded.
--
https://code.launchpad.net/~rvb/launchpad/longpoll-cursor/+merge/77914
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~rvb/launchpad/longpoll-cursor into lp:launchpad.
=== modified file 'lib/lp/app/templates/base-layout-macros.pt'
--- lib/lp/app/templates/base-layout-macros.pt 2011-09-30 05:37:38 +0000
+++ lib/lp/app/templates/base-layout-macros.pt 2011-10-03 11:37:46 +0000
@@ -132,8 +132,12 @@
activateConstrainBugExpiration();
Y.lp.app.links.check_valid_lp_links();
// Longpolling will only start if
- // LP.cache.longpoll is populated.
- Y.lp.app.longpoll.setupLongPollManager();
+ // LP.cache.longpoll is populated.
+ // We use Y.later to work around a Safari/Chrom 'feature':
+ // The mouse cursor stays 'busy' until all the requests started during
+ // page load are finished. Hence we want the long poll request to start
+ // right *after* the page as loaded.
+ Y.later(0, Y.lp.app.longpoll, Y.lp.app.longpoll.setupLongPollManager, false);
}, window);
// Hook up the function that dismisses the help window if we click