New issue 107366 by steveli...@gmail.com: cannot delete certain characters
from contenteditable div where css display values conflict
http://code.google.com/p/chromium/issues/detail?id=107366
Chrome Version : 15.0.874.121
OS Version: Ubuntu Linux (11.10), Windows 7, Mac OSX 10.6
URLs (if applicable) :
Other browsers tested:
Add OK or FAIL after other browsers where you have tested this issue:
Safari 5: OK
Firefox 4.x: OK
IE 7/8/9: not tested
What steps will reproduce the problem?
1. create css class .s1 { display:inline; }
2. create css class .s2 { display:table; }
3. apply both classes to a contenteditable div
4. add some text to the div
5. try to delete the first character in the div (doesn't work)
6. try to delete the last character in the div (works but then loses focus
- can only delete a single character)
7. delete any characters in the middle of the content - works correctly
What is the expected result?
Should always be able to delete any and all characters without losing focus.
What happens instead?
cannot delete the first character, or more than one from the end of the
contenteditable div without losing focus.
Please provide any additional information below. Attach a screenshot if
possible.
Attached is the minimum html to replicate the issue.
I am aware of course that the css is nonsensical.
The real issue is that in a complex web-application it is possible to
accidentally create a situation where the css conflicts like this and the
failure-mode is *very* misleading - we suspected javascript event handlers
rather than css and wasted a lot of time hunting for the source of the
problem as a result.
The bug continues to manifest if the .s2 class sets {
display:table !important; }
Similar to, but seemingly more specific than bug 73278, based on the
replication steps described there.
UserAgentString: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.2 (KHTML,
like Gecko) Chrome/15.0.874.121 Safari/535.2
Attachments:
css-bug.html 287 bytes
Comment #1 on issue 107366 by tk...@chromium.org: cannot delete certain
characters from contenteditable div where css display values conflict
http://code.google.com/p/chromium/issues/detail?id=107366
(No comment was entered for this change.)
Online example at http://steveliles.github.com/google_chrome_css_bug.html -
try editing the text in the green box.
Correction for step 6. described above - I said:
"6. try to delete the last character in the div (works but then loses focus
- can only delete a single character)"
... but on re-examination the div does *not* lose focus - rather the focus
remains but the caret disappears.
Replicated also on Chrome 16.0.912.41 beta (Ubuntu Linux).