Closed Bug 213687 Opened 23 years ago Closed 3 years ago

*.execCommand("selectall", false, null) does not select everything (in a document that is rich text editing enabled)

Categories

(Core :: DOM: Editor, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: samuel.stock, Unassigned)

References

()

Details

(Whiteboard: midas)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 This command works on MSIE 6 but not on my Mozilla: document.getElementById("editor").contentWindow.document.execCommand("selectall", false, null); It seems that Mozilla is unselecting everything instead of selecting all. This happens when I put my own HTML-Code into the document by using: document.getElementById("editor").contentWindow.document.body.innerHTML="myHTML"; Reproducible: Always Steps to Reproduce: 1. create HTML-File: <html> <head> <title>RTE- select all</title> <script language="JavaScript"> <!--// function initRTE() { // frames.editor.document.designMode = "On"; //MSIE document.getElementById('editor').contentDocument.designMode = "on" //Mozilla //insert some HTML document.getElementById('editor').contentWindow.document.body.innerHTML="<b>hello</b> World!"; } setTimeout("initRTE()",100); function selectAll() { document.getElementById("editor").contentWindow.focus(); document.getElementById("editor").contentWindow.document.execCommand("selectall", false, null); document.getElementById("editor").contentWindow.focus(); } //--> </script> </head> <body> <iframe id="editor" width="700px" height="300px"></iframe><br> <a href="javascript:selectAll();">Select all</a> </body> </html> 2. Start Mozilla & load HTML-File Actual Results: It seems that Mozilla is unselecting everything instead of selecting all. Expected Results: Mozilla should select everything.
Midas issue, not DOM issue...
Assignee: dom_bugs → jfrancis
Component: DOM Other → Editor: Core
QA Contact: desale → sairuh
-->brade
Assignee: mozeditor → brade
Whiteboard: midas
Status: UNCONFIRMED → NEW
Ever confirmed: true
QA Contact: bugzilla → editor

The bug assignee is inactive on Bugzilla, so the assignee is being reset.

Assignee: brade → nobody

Not reproducible in 105a.

URL: data:text/html,<iframe srcdoc="<p>hel...
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.