Closed Bug 487185 Opened 16 years ago Closed 16 years ago

External links open multiple times

Categories

(Mozilla Labs :: Prism, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: matthew.gertner, Assigned: matthew.gertner)

References

Details

Attachments

(1 file, 1 obsolete file)

Sometimes in Gmail, clicking on an external link causes it to open multiple times in the default browser. It seems like the longer I use Gmail, the more tabs open when I click a link.
Attachment #371408 - Flags: review?(mark.finkle)
Comment on attachment 371408 [details] [diff] [review] Remove old event listeners (in any) for clicks before adding new ones Oops, just had the problem again. Will have to keep looking for the solution.
Attachment #371408 - Attachment is obsolete: true
Attachment #371408 - Flags: review?(mark.finkle)
Comment on attachment 371408 [details] [diff] [review] Remove old event listeners (in any) for clicks before adding new ones I'm continuing to use this patch, and it seems to help a lot even if it doesn't fix the problem entirely. Let's get it checked in and take it from there.
Attachment #371408 - Attachment is obsolete: false
Attachment #371408 - Flags: review?(mark.finkle)
Comment on attachment 371408 [details] [diff] [review] Remove old event listeners (in any) for clicks before adding new ones This really can't help as is. the removeEventListener call uses the function arg to lookup and remove the event handler. In this case you are using anonymous functions for both add and remove, so it's not possible to remove any listeners.
Attachment #371408 - Flags: review?(mark.finkle) → review-
(In reply to comment #5) > (From update of attachment 371408 [details] [diff] [review]) > This really can't help as is. the removeEventListener call uses the function > arg to lookup and remove the event handler. > > In this case you are using anonymous functions for both add and remove, so it's > not possible to remove any listeners. D'oh! I guess it's just coincidence that I am seeing the problem less often. I'll fix it.
Something like this?
Attachment #371408 - Attachment is obsolete: true
Attachment #374333 - Flags: review?(mark.finkle)
Comment on attachment 374333 [details] [diff] [review] Used named functions for click handlers Yeah, something like that should work. You have HostUI removal cruft in here too!
Attachment #374333 - Flags: review?(mark.finkle) → review+
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: