document.getSelection() needs to be implemented

RESOLVED FIXED in M16

Status

()

enhancement
P3
normal
RESOLVED FIXED
19 years ago
19 years ago

People

(Reporter: german, Assigned: jst)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Reporter

Description

19 years ago
in 4.x the JS function document.getSelection() returned the currently selected
text in a window. While this was a Netscape-only feature many websites make use
of it. This does not currently work in Mozilla. This would be great thing to
have for Mozilla.
If this will not be implemented, the resolution of this bug should be a note
added the developer release notes. It should include how this feature could be
accomplished in a different way (using DOM or XPCom maybe?)
Feel free to change the component/foward to other owner if JS Engine is the
wrong one.

Updated

19 years ago
Keywords: 4xp
Summary: [4.x P] document.getSelection() no longer supported → document.getSelection() no longer supported
This would be a DOM 4xp enhancement. Reassigning to joki for now.

Although we terminated the Layer DOM API in particular, it would be nice if we 
could provide as much backward compatibility as possible for other Nav4 
extensions where it's possible to do so without violating standards or incurring 
major development costs.

This would should be prioritized as less important than implementing and 
debugging the W3C standards, but ideally something we'd like to get in for 
beta2. Is there an easy way to implement this by invoking the DOM2 code for 
getting the current selection?
Assignee: rogerl → joki
Summary: document.getSelection() no longer supported → document.getSelection() needs to be implemented
Assignee

Comment 2

19 years ago
Assignee

Comment 3

19 years ago
The patch I just attached makes document.getSelection() work in mozilla very
much the same way it works in NS 4.x. Apparently the patch removes a lot of
useful debuggin code that is used by the editor so we'll probably haveto change
the patch to work better together with the editor before checkin this in.

Cc:ing akkana and myself.

cc self.

Comment 5

19 years ago
*** Bug 36343 has been marked as a duplicate of this bug. ***

Comment 6

19 years ago
reassign to jst; reset component
Assignee: joki → jst
Component: Javascript Engine → DOM Level 0
Target Milestone: --- → M16
Assignee

Comment 7

19 years ago
This is finally done, document.getSelection() returns the selected text as a
string, and it puts a message in the console saying the document.getSelection()
is depricated, use window.getSelection() in stead. window.getSelection() is also
implemented but that returns a selection object in stead of a string.

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