Closed
Bug 221794
Opened 19 years ago
Closed 19 years ago
Uncaught exception, when using surroundContents with a portion of a TextOnly Document!
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 135928
People
(Reporter: trifox, Unassigned)
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20030925 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20030925 a document, constisting of <body> bla bla bla some text </body> and a range starting at the last "bla" to "some" when using sel.getRangeAt(0).surroundContents(Some_NODE); i get the following error: Error: uncaught exception: [Exception... "Index or size is negative or greater than the allowed amount" code: "1" nsresult: "0x80530001 (NS_ERROR_DOM_INDEX_SIZE_ERR)" location: "http://cms/imperia/jscript/htmleditor/htmleditor_scripts_v2.js Line: 274"] Reproducible: Always Steps to Reproduce: 1. Create a html document with ONLY TEXT 2. Select Some text 3. execute the following javascript code in the location bar: javascript:window.getSelection().getRangeAt(0).surroundContents(document.createElement("A")) Actual Results: i got an uncaught exception, Error: uncaught exception: [Exception... "Index or size is negative or greater than the allowed amount" code: "1" nsresult: "0x80530001 (NS_ERROR_DOM_INDEX_SIZE_ERR)" location: "javascript:window.getSelection().getRangeAt(0).surroundContents(document.createElement("A")) Line: 1"] Expected Results: It should have surrounded the selected text node with the "A" tag, so that it is now a LINK !
![]() |
||
Comment 1•19 years ago
|
||
Not Javascript.
Assignee: rogerl → traversal-range
Component: JavaScript Engine → DOM Traversal-Range
QA Contact: PhilSchwartau → ian
![]() |
||
Comment 2•19 years ago
|
||
*** This bug has been marked as a duplicate of 135928 ***
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
Updated•9 years ago
|
Component: DOM: Traversal-Range → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•