Summary: | character appears in contenteditable without onkeydown event being fired | ||
---|---|---|---|
Product: | WebKit | Reporter: | Mike Lawther <mikelawther> |
Component: | UI Events | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | CC: | ap, darin, leviw, naiem.shaik, ojan, ojan, rniwa |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Description
Mike Lawther
2011-08-03 20:54:36 PDT
Looks like a regression because i have a little older build and I do not see the issue..will build the latest nightly and see. (In reply to comment #1) > Looks like a regression because i have a little older build and I do not see the issue..will build the latest nightly and see. plz ignore this comment i was able to reproduce the issue. will analyse and get back When clicking on the button, the input field loses focus ring, but insertion point keeps blinking. Bug 38546 might be tangentially related to such behavior. Once again, I urge everyone to attach test cases, not link to outside sites. There are lots of bugs that have gone invalid due to remote links dying, and storing many reductions on a single outside site is particularly unfortunate. I did put the reduction inline into the report. The jsfiddle link was intended as a convenience. Perhaps I should have reversed the order of their appearance to make this clearer. Or did you mean create an attachment, and put the test case into the attachment? Personally I find that less convenient, but I'm happy to do it that way if that is the accepted way in the WebKit community (eg there are automated tools that can make use of attachments or somesuch). In the function clearSelectionIfNeeded which is called whenever focusednode is set, there is a check to see if the node is text or input tag if it is none then it is not cleared--> pasted below comment from code " // Don't clear the selection for contentEditable elements, but do clear it for input and textarea. See bug 38696." Since this is a contentEditable the clear is not called on it and because of which the updateApperance is not called and hence the cursor blinks and focus is not removed from the div. I have added the s->clear irrespective of the tag and it fixes the issue. If some one can comment on why the check for contenteditable is present i will try some other fix. CC'ing Levi, who has a patch for bug 38696. > If some one can comment on why the check for contenteditable is present i will try some other fix. There are some things you can do to find it out: 1. "svn blame" command to see when this code was added. 2. Make a change and run regression tests to see what breaks. Thanks Ryosuke - I hadn't considered that bug when I did a search before filing this bug (since its title mentions events are still received), but comment #4 on bug 38696 does say that the onkeydown event is *not* fired. Marking as dupe. *** This bug has been marked as a duplicate of bug 38696 *** |