Closed Bug 1504714 Opened 6 years ago Closed 6 years ago

[PDF Viewer] Actually remove all message listeners when `FindEventManager` is unloaded

Categories

(Firefox :: PDF Viewer, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 65
Tracking Status
firefox65 --- fixed

People

(Reporter: Snuffleupagus, Assigned: Snuffleupagus)

Details

Attachments

(1 file)

Actually remove all message listeners when `FindEventManager` is unloaded

Currently the "PDFJS:Child:handleEvent" message listener isn't removed when the `FindEventManager` is unloaded.
If the user re-loads the current (PDF) document, using e.g. the F5 key, the old message listener will thus persist, causing subsequent find event to be handled more than once. This is quite bad, since it causes one (or more) matches to be completely skipped when the user attempts to search after re-loading the document.
Summary: Remove all listeners → [PDF Viewer] Actually remove all message listeners when `FindEventManager` is unloaded
Attached patch bug1504714.patchSplinter Review
Attachment #9022615 - Flags: review?(bdahl)
Attachment #9022615 - Flags: review?(bdahl) → review+
Keywords: checkin-needed
Pushed by csabou@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/059c589d93bb
Actually remove all message listeners when `FindEventManager` is unloaded. r=bdahl
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/059c589d93bb
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 65
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: