Open
Bug 561940
Opened 14 years ago
Updated 2 years ago
"ASSERTION: setting focus to a node from the wrong document" with <input type=file>, contentEditable
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
NEW
People
(Reporter: jruderman, Unassigned)
References
Details
(Keywords: assertion, testcase)
Attachments
(1 file, 2 obsolete files)
366 bytes,
text/html
|
Details |
###!!! ASSERTION: setting focus to a node from the wrong document: '!aNode || aNode->GetCurrentDoc() == mDoc', file /Users/jruderman/mozilla-central/dom/base/nsGlobalWindow.cpp, line 6931
Reporter | ||
Comment 1•14 years ago
|
||
The testcase only triggers the assertion if the browser window does *not* have focus. It reloads itself after 2 seconds to make testing easier.
Comment 2•14 years ago
|
||
This testcase doesn't reload. What's happening here: 1. The <input type="file"> is focused with focus() 2. This causes the focus to be placed on the anonymous button inside it. 3. Setting contentEditable and flushing changes (by retrieving offsetHeight) causes the focused anonymous button to be removed from the document. Presumably, the anonymous content is regenerated. If I change the timeout, I can visibly see the focus ring disappear from the button when this happens. 4. However, the focus manager is not notified of content removal so assumes the button is still focused. I assume somewhere code needs to be added to notify the focus manager when focused anonymous content is removed. I don't know where that would be. Note that various warnings appear: WARNING: NS_ENSURE_TRUE(mDoneSetup) failed: file /builds/moz2/working/editor/composer/src/nsEditingSession.cpp, line 561 WARNING: NS_ENSURE_TRUE(mBoundFrame) failed: file /builds/moz2/working/content/html/content/src/nsTextEditorState.cpp, line 1326 WARNING: NS_ENSURE_TRUE(mBoundFrame) failed: file /builds/moz2/working/content/html/content/src/nsTextEditorState.cpp, line 1326
Attachment #441693 -
Attachment is obsolete: true
Comment 3•14 years ago
|
||
Attachment #456861 -
Attachment is obsolete: true
Updated•14 years ago
|
Assignee: nobody → ehsan
Reporter | ||
Comment 4•14 years ago
|
||
WFM?
Comment 5•14 years ago
|
||
(In reply to comment #4) > WFM? Does it not trigger the assertion for you? It does for me, if the browser window is not focused, as stated in comment 1.
Assignee | ||
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
Updated•5 years ago
|
Assignee: ehsan → nobody
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•