`selection` events are not fired for existing documents

RESOLVED FIXED

Status

Add-on SDK
General
P1
normal
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: zer0, Assigned: zer0)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Assignee)

Description

6 years ago
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
(Assignee)

Updated

6 years ago
Summary: `selection` module is not applied to existing documents → `selection` events are not fired for existing documents
(Assignee)

Updated

6 years ago
Assignee: nobody → zer0
(Assignee)

Updated

6 years ago
Depends on: 803027
Can you see when this broke (or whether it was always broke)?
Priority: -- → P1
(Assignee)

Comment 2

6 years ago
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.
(Assignee)

Updated

6 years ago
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.