Need a way to get user selected text in browser window from JS

VERIFIED FIXED in M16

Status

()

P3
major
VERIFIED FIXED
19 years ago
19 years ago

People

(Reporter: akkzilla, Assigned: sfraser_bugs)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [nsbeta2+ til 5/16])

(Reporter)

Description

19 years ago
The editor has editorSelection, but from a browser window there's no way to get
an nsIDOMSelection.  It's owned by the PresShell, which is not scriptable.

I think Mike was looking into this when he made the nsISelectionController
interface, but it got lost in an end-of-milestone shuffle.
(Reporter)

Comment 1

19 years ago
We should try to get this in before beta 2, so the API doesn't change much after
that and so that people can use the API for JS development.
Keywords: beta2
Target Milestone: ---

Updated

19 years ago
Summary: Need a way to get selection from JS → Need a way to get user selected text in browser window from JS

Updated

19 years ago
Target Milestone: --- → M16

Comment 2

19 years ago
good idea got a change in my tree at home that will do this i think

Status: NEW → ASSIGNED
(Assignee)

Comment 3

19 years ago
You do, mike? I'm also working on this; we should talk.

Comment 4

19 years ago
i am resolving this its a dup of one of simons
Status: ASSIGNED → RESOLVED
Last Resolved: 19 years ago
Resolution: --- → WONTFIX

Comment 5

19 years ago
Then you should have "dup'd" it to a bug # instead of "wontfix"!
(Assignee)

Comment 6

19 years ago
Actually, I need this bug.
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
(Assignee)

Comment 7

19 years ago
Reassign
Assignee: mjudge → sfraser
Status: REOPENED → NEW
(Assignee)

Comment 8

19 years ago
Note: we should implement document.getSelection() too.
Status: NEW → ASSIGNED

Updated

19 years ago
Keywords: nsbeta2

Updated

19 years ago
Keywords: beta2
Whiteboard: [nsbeta2+ til 5/16]
(Assignee)

Comment 9

19 years ago
jst, mjudge: I think this will be covered by document.getSelection(), and/or 
nsIDocShell.getSelection(). Do you agree?
After discussing this with a number of people, mjudge included, we decided
to add getSelection() to the Window interface, this is now checked in, marking
this bug fixed.
Status: ASSIGNED → RESOLVED
Last Resolved: 19 years ago19 years ago
Resolution: --- → FIXED

Comment 11

19 years ago
yeah!

Comment 12

19 years ago
akkana, might this be fixed to your satisfaction? (Doesn't look possible to 
verify using black box means.)

Thanks!
(Reporter)

Comment 13

19 years ago
This fix should be fine.  Marking verified: German, since you're one person who
needed this, please reopen the bug if you find it's not adequate.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.