Closed Bug 801347 Opened 12 years ago Closed 12 years ago

`selection` events are not fired for existing documents

Categories

(Add-on SDK Graveyard :: General, defect, P1)

x86
macOS
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: zer0, Assigned: zer0)

References

Details

With this code:

    require("selection").on("select", function(){
      console.log(this.text);
    });

The selection's listener seems not be applied to existing documents but only new documents.

I'm not sure if it's a regression, but in according to the comments in selection's module it seems: https://github.com/mozilla/addon-sdk/blob/master/lib/sdk/selection.js#L354-358
Summary: `selection` module is not applied to existing documents → `selection` events are not fired for existing documents
Assignee: nobody → zer0
Depends on: 803027
Can you see when this broke (or whether it was always broke)?
Priority: -- → P1
I checked with SDK 1.10, and the issue is present there as well. I can't when we start to have this issue, but in accordance with the comment I mentioned, probably we use tab-browser's tracker for that. It could be that something changed in tracker or selection code that makes it not working anymore as expected. However because tab-tracker is deprecated, we didn't find / fix it earlier.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.