Closed Bug 32897 Opened 24 years ago Closed 24 years ago

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

Categories

(Core :: DOM: Selection, defect, P3)

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: akkzilla, Assigned: sfraser_bugs)

Details

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

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.
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: ---
Summary: Need a way to get selection from JS → Need a way to get user selected text in browser window from JS
Target Milestone: --- → M16
good idea got a change in my tree at home that will do this i think

Status: NEW → ASSIGNED
You do, mike? I'm also working on this; we should talk.
i am resolving this its a dup of one of simons
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → WONTFIX
Then you should have "dup'd" it to a bug # instead of "wontfix"!
Actually, I need this bug.
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
Reassign
Assignee: mjudge → sfraser
Status: REOPENED → NEW
Note: we should implement document.getSelection() too.
Status: NEW → ASSIGNED
Keywords: nsbeta2
Keywords: beta2
Whiteboard: [nsbeta2+ til 5/16]
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
Closed: 24 years ago24 years ago
Resolution: --- → FIXED
yeah!
akkana, might this be fixed to your satisfaction? (Doesn't look possible to 
verify using black box means.)

Thanks!
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.