Closed Bug 139416 Opened 23 years ago Closed 23 years ago

getselection() does not work inside input fields

Categories

(Core :: JavaScript Engine, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 85686

People

(Reporter: bugs, Assigned: rogerl)

References

()

Details

Attachments

(1 file)

From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.0rc1) Gecko/20020417 BuildID: 2002041711 Javascript method getselection() does not work inside input fiels (tested with textarea and type='text'). Reproducible: Always Steps to Reproduce: 1. load url with example 2. select text in the textarea Actual Results: nothing happens Expected Results: selected text should be displayed in right input field (works with Internet Explorer) This Javascript-function is used: function showselected() { if (window.getSelection) show = window.getSelection(); // for Netscape 6 (doesn't work) else if (document.getSelection) show = document.getSelection(); // for Netscape 4 (doesn't work) else if (document.selection) show = document.selection.createRange().text; // for IE (works) document.getElementById("text").value = show; }
Duplicate of bug 85686?
*** This bug has been marked as a duplicate of 85686 ***
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
Verified Duplicate. Thomas, thank you for this report; you have been cc'ed on the other bug -
Status: RESOLVED → VERIFIED
Attached file Test Case
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: