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

NEW
Assigned to

Status

()

Core
Widget: Cocoa
P3
normal
9 years ago
7 years ago

People

(Reporter: Dan POPA, Assigned: smichaud)

Tracking

({perf})

unspecified
PowerPC
Mac OS X
Points:
---
Bug Flags:
wanted1.9.1 ?

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

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

Comment 1

9 years ago
Created attachment 341294 [details]
page with 1 contenteditable DIV containing a big image
(Reporter)

Comment 2

9 years ago
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.
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.
(Assignee)

Comment 4

9 years ago
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.)
Assignee: nobody → joshmoz
Status: UNCONFIRMED → NEW
Component: Editor → Widget: Cocoa
Ever confirmed: true
QA Contact: editor → cocoa
(Assignee)

Updated

9 years ago
Assignee: joshmoz → smichaud
Flags: wanted1.9.1?
Priority: -- → P3
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.
is this seen in  10.6?
Keywords: perf
(Reporter)

Comment 7

7 years ago
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.
You need to log in before you can comment on or make changes to this bug.