DOMCharacterDataModified is not fired correctly in DesignMode with consecutive spaces

RESOLVED WORKSFORME

Status

()

Firefox
General
RESOLVED WORKSFORME
10 years ago
7 years ago

People

(Reporter: sillyxone, Unassigned)

Tracking

2.0 Branch
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

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

(Reporter)

Description

10 years ago
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
(Reporter)

Comment 1

10 years ago
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
(Reporter)

Comment 3

7 years ago
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
Last Resolved: 7 years ago
Resolution: --- → FIXED

Updated

7 years ago
Resolution: FIXED → WORKSFORME
You need to log in before you can comment on or make changes to this bug.