Closed
Bug 232791
Opened 21 years ago
Closed 16 years ago
Midas don't let user delete text after adding text with innerHTML
Categories
(Core :: DOM: Editor, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 474255
People
(Reporter: dragoran, Unassigned)
References
()
Details
(Keywords: testcase, Whiteboard: midas)
Attachments
(2 files)
User-Agent:
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.5) Gecko/20031007 Firebird/0.7
i have coded a wysiwyg editor and it works fine but when i change the innerHTML
to anything (designMode is still on) the user cannot change the text until
he/she type a char. in MSIE the user don't have to type anything it just works.
Reproducible: Always
Steps to Reproduce:
if you have a iframe with a id edit (designMode='on')
and have button like this
<input type="button"
onclick="document.getElementById('edit').contentDocument.body.innerHTML='<b>test</b>'"
value="x" />
you will see this issue
Actual Results:
the user must type a char to be able to edit the text
Expected Results:
the user should be able to edit the text without typing a char
Comment 1•21 years ago
|
||
Can you provide with a testcase?
(In reply to comment #1)
> Can you provide with a testcase?
yes
http://dragoran.hockrad02.de/editor/editor2.html
klick test and try to edit the content...
then enter any char and try it again
Updated•21 years ago
|
Comment 3•21 years ago
|
||
I dont know exaclty whats wrong here, i press the test button, and it adds
"test", then i select the text and press bold, italic etc and it all works fine.
(In reply to comment #3)
> I dont know exaclty whats wrong here, i press the test button, and it adds
> "test", then i select the text and press bold, italic etc and it all works fine.
try to delete test (using backspace)
Comment 5•21 years ago
|
||
Confirming, to reproduce:
1. Press test button to insert "test" string
2. try to delete the inserted text with backspace.
Assignee: blake → mozeditor
Status: UNCONFIRMED → NEW
Component: General → Editor: Core
Ever confirmed: true
OS: Linux → All
Product: Firebird → Browser
QA Contact: sairuh
Version: unspecified → Trunk
Updated•21 years ago
|
Summary: Midas don't let user delete text → Midas don't let user delete text after adding text with innerHTML
Whiteboard: midas
Updated•21 years ago
|
Severity: normal → major
Comment 6•20 years ago
|
||
url doesn't find the testcase anymore
Comment 7•20 years ago
|
||
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050619
Firefox/1.0+
I'm activating designMode on window.onload here, since Fx 1.0.x has trouble
with designMode in iframe onload. 500ms delay before setting innerHTML ensures
plenty of time for the iframe contents to completely load.
Comment 8•20 years ago
|
||
The workaround consists of toggling off/on designMode after setting innerHTML:
editor.body.innerHTML = 'abc';
editor.designMode = 'off';
editor.designMode = 'on';
Interestingly, this (along with the 0-delay setTimeout and nulling onload
workarounds) toggling allows Fx 1.0.x to activate designMode on iframe onload.
That means I don't need the 500ms delay before setting innerHTML.
Comment 9•20 years ago
|
||
After some more experimentation, the designMode toggling actually isn't
necessary. designMode just needs to be set to 'on' again:
editor.body.innerHTML = 'abc';
editor.designMode = 'on';
Also, the mentioned Fx 1.0.x iframe onload fix is the 0-time setTimeout.
Updated•20 years ago
|
Flags: blocking1.8b4?
Comment 10•20 years ago
|
||
I take that back.
editor.body.innerHTML = 'abc';
editor.designMode = 'off';
editor.designMode = 'on';
is necessary for the latest build.
editor.body.innerHTML = 'abc';
editor.designMode = 'on';
works for 1.0.5.
Updated•20 years ago
|
Flags: blocking1.8b4? → blocking1.8b4-
Comment 11•18 years ago
|
||
toggling off/on designMode after setting innerHTML still needed in Firefox 1.5 and Firefox 2.0
Updated•18 years ago
|
QA Contact: bugzilla → editor
Updated•18 years ago
|
Assignee: mozeditor → nobody
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•