Merge lp:~benji/launchpad/bug-779538 into lp:launchpad
Status: | Rejected | ||||
---|---|---|---|---|---|
Rejected by: | Benji York | ||||
Proposed branch: | lp:~benji/launchpad/bug-779538 | ||||
Merge into: | lp:launchpad | ||||
Diff against target: |
69 lines (+26/-18) 2 files modified
lib/canonical/launchpad/icing/style-3-0.css (+3/-13) lib/lp/app/templates/base-layout-macros.pt (+23/-5) |
||||
To merge this branch: | bzr merge lp:~benji/launchpad/bug-779538 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Launchpad code reviewers | Pending | ||
Review via email: mp+60650@code.launchpad.net |
This proposal supersedes a proposal from 2011-05-10.
Description of the change
Bug 779538 describes a regression caused by my recent change to add a
"Hide X" link to notification boxes so the user can dismiss them when
they're no longer needed (especially useful on AJAX-heavy pages).
Unfortunately that behavior extended to links within the notification
box.
When a user would click on a link in a notification box the box would
disappear. This is primarily a problem when control- or shift-clicking
on a link to open it in another browser tab or window.
This branch rectifies that problem by using a different approach to
implement the click-to-close behavior. We now use setInterval to
periodically add real (as opposed to the previous approach of using CSS)
hide links and attaching click handlers to them. This preserves all the
expected behavior of message boxes (control-
doesn't close them, highlighting text works correctly, etc.).
The setInterval period is so high (500 ms), and the function does so
little that it should introduce only negligible CPU load. Memory leaks
are also a concern with approaches like this: I can't see that any
objects are allocated in the "idle" case, so I believe there are no
leaks.
The make lint report is clean.
Unmerged revisions
- 13019. By Benji York
-
settled on final approach
- 13018. By Benji York
-
even better
- 13017. By Benji York
-
make the comment a little clearer
- 13016. By Benji York
-
a much nicer way to handle this
- 13015. By Benji York
-
works, but it's ugly