Closed Bug 427523 Opened 18 years ago Closed 18 years ago

contentEditable does not executeCommand on clicking a button that is outside the contentEditable (the contentEditable loses focus)

Categories

(Firefox :: General, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 421640

People

(Reporter: piotr, Unassigned)

References

()

Details

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9b4) Gecko/2008031318 Firefox/3.0b4 Build Identifier: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9b4) Gecko/2008031318 Firefox/3.0b4 Having: - div that has contentEditable attribute set to true - set of buttons that binds to executeCommand(cmd, null, null) - cmd can be 'bold' f.e. The div allows user to enter text, but clicking on button makes the div lose focus and formatting is not applied. When binding the executeCommand to the div (onclick f.e.) the behaviour is correct. Reproducible: Always Steps to Reproduce: 1. Go to http://starkravingfinkle.org/blog/wp-content/uploads/2007/07/contenteditable.htm 2. Edit the content of the editable div. 3. Try to bold/italic/underline anything. Actual Results: Clicking the bold/underline button does not work. Expected Results: Selected on the contentEditable div text should be bolded/underlined. Seems like this is strictly connected with the div loosing focus.
On pointed demo, when changing onclick event to onmousedown, the formatting seems to work, but the selection that was made is lost.
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.