Last Comment Bug 458051 - The typing becomes slow inside an contenteditable element when the selection caret is before a big / large image and the image has a small width attribute set and there are enough characters before the image
: The typing becomes slow inside an contenteditable element when the selection ...
Status: NEW
: perf
Product: Core
Classification: Components
Component: Widget: Cocoa (show other bugs)
: unspecified
: PowerPC Mac OS X
: P3 normal with 1 vote (vote)
: ---
Assigned To: Steven Michaud [:smichaud] (Retired)
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-10-01 08:25 PDT by Dan POPA
Modified: 2010-09-21 03:48 PDT (History)
4 users (show)
smichaud: wanted1.9.1?
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
page with 1 contenteditable DIV containing a big image (1.44 KB, text/html)
2008-10-01 08:30 PDT, Dan POPA
no flags Details

Description Dan POPA 2008-10-01 08:25:39 PDT
User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.3) Gecko/2008092414 Firefox/3.0.3
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.3) Gecko/2008092414 Firefox/3.0.3

The typing becomes slow inside an contenteditable element when the selection caret is before a big / large image and the image has a small width attribute set and there are enough characters before the image.

See attachment for reproduction.



Reproducible: Always

Steps to Reproduce:
1. Have a DIV with contenteditable="true"
<div contenteditable="true">12<img src="http://oposite.stsci.edu/pubinfo/pr/2002/11/prc/0211a.jpg" width="20" />. Typing will be very slow when more than 20 characters are typed before this image having width="20".</div>

2. open page, put the selection cursor before the image and start typing

Actual Results:  
After a certain number of characters the typing becomes slow.
Comment 1 Dan POPA 2008-10-01 08:30:30 PDT
Created attachment 341294 [details]
page with 1 contenteditable DIV containing a big image
Comment 2 Dan POPA 2008-10-01 08:32:27 PDT
Increasing the width of the image using the resize handles will increase the number of characters that can be typed in before the typing will become slow again.
Comment 3 Ria Klaassen (not reading all bugmail) 2008-10-01 10:29:34 PDT
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b1pre) Gecko/20081001 Minefield/3.1b1pre

I was not able to reproduce this on this (slow) Windows XP computer. So this might affect Mac only.
Comment 4 Steven Michaud [:smichaud] (Retired) 2008-10-01 16:17:40 PDT
How bizarre.

I see this (with Firefox 3.0.3) on OS X 10.5.5, but not on OS X
10.4.11.  So this is presumably some kind of Apple bug (an OS bug).
But since the problem doesn't happen in Safari, Apple is unlikely to
fix it anytime soon.

I may be able to find a workaround, and if so it will probably be in
Cocoa widgets.  But because the work will be difficult, and because
this is (probably) really Apple's bug, I'm not going to give it a high
priority.

(By the way, I don't see this (using Firefox 3.0.1) on Windows or
Linux, either.)
Comment 5 Smokey Ardisson (offline for a while; not following bugs - do not email) 2008-10-01 21:50:38 PDT
Historically, slow typing bugs in Widget:Cocoa have typically been traced to excessive redrawing, so looking at this in Quartz Debug might be a good place to start. I suppose it's also possible that the ATSUI layout routines we're using are more expensive (or simply different) on 10.5 than on 10.4....

Since 10.5 is not dead yet, it would be good to figure out for sure if this really is Apple's bug rather than Gecko's bug, and if so and rdar:// it, since there's a chance it could be fixed in a later 10.5.x iteration, or at the very least not propagated to 10.6.
Comment 6 Wayne Mery (:wsmwk, NI for questions) 2010-09-18 13:55:33 PDT
is this seen in  10.6?
Comment 7 Dan POPA 2010-09-21 03:48:34 PDT
Yes. Typing is very slow no matter where you type, before or after the image, contenteditable is unusable.

Everything works OK after you delete the image.

Everything works OK after you resize the image using the mouse to drag the resize handles or changing attributes in Firebug.

Note You need to log in before you can comment on or make changes to this bug.