Closed Bug 431179 Opened 16 years ago Closed 14 years ago

DOMCharacterDataModified is not fired correctly in DesignMode with consecutive spaces

Categories

(Firefox :: General, defect)

2.0 Branch
x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: sillyxone, Unassigned)

Details

(Whiteboard: [CLOSEME 2010-09-15])

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.14) Gecko/20080418 Ubuntu/7.10 (gutsy) Firefox/2.0.0.14
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.14) Gecko/20080418 Ubuntu/7.10 (gutsy) Firefox/2.0.0.14

enable designMode for an iFrame. When type in two consecutive spaces, for example "ab  ", the first and second space generates lots of DOMCharacterDataModified events inserting and deleting spaces (with #160 or   character).

However, when typing in a letter after those two consecutive spaces, for example, "ab  c", the only event that is fired is removing the consecutive spaces (replace "ab__ " by "ab", where _ stands for  ). It seems that only the last event of the adjusting sequence is fired.

It should be consistent, either fire the white space adjusting sequence in all cases or don't fire at all. 

Or maybe I'm missing something here? thanks

Reproducible: Always

Steps to Reproduce:
1.enable designMode for an iFrame
2.type in a few letter and two consecutive spaces, the first and second spaces should fire a lot of DOMCharacterDataModified events, showing the white space adjusting sequence (I think only the final event should be fired as it's the only event that matters)
3.type in a letter after the two spaces, the only event that fire is DOMCharacterDataModified, which is removing two   and a space from that whole text, while the whole action is inserting another letter.


Expected Results:  
fire all or don't fire any of the white space adjusting sequence
Additionally, any character type in after that sequence always fire the same incorrect event. For example, we have:

ab  c

type letter d at the end, make it become

ab  cd

fires only one event of DOMCharacterDataModified with 
prevValue="ab  c"
newValue="ab"

while it should be;
prevValue="ab  c"
newValue="ab  cd"
Reporter, are you still seeing this issue with Firefox 3.6.x or later in safe mode? If not, please close. These links can help you in your testing.
http://support.mozilla.com/kb/Safe+Mode
http://support.mozilla.com/kb/Managing+profiles
Whiteboard: [CLOSEME 2010-09-15]
Version: unspecified → 2.0 Branch
Sorry for didn't update this ticket. The problem is not present in Firefox 3, even in normal mode, and my web app is working fine (in fact, we have to force FF3 for all clients as it's the only browser with needed stable/correct DOM events)

thanks
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Resolution: FIXED → WORKSFORME
You need to log in before you can comment on or make changes to this bug.