[Webkit-unassigned] [Bug 16976] New: caret position needs to be set *before* firing/handling input events

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 22 11:51:28 PST 2008


http://bugs.webkit.org/show_bug.cgi?id=16976

           Summary: caret position needs to be set *before* firing/handling
                    input events
           Product: WebKit
           Version: 525+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: HTML Editing
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: timmmaaayyy at gmail.com


Editor::appliedEditing currently dispatches input events and after sets the
selection (caret) to the end of the text. This means when handling an input
event, you cannot modify the selection without being 'trumped' by this later
setting by appliedEditing. 

I tried making a patch to fix this by simply moving one line in this method,
dispatchEditibleContentChangedEvents, 5 lines down so it occurs after the call
to setSelection. I created a layout test to verify (see attached). However, the
patch causes two layout tests to fail: fast/forms/drag-into-textarea.html and
fast/forms/drag-out-of-textarea.html. The output differs in these two tests
because rather than cut/pasting, the drag an drop results in both fields being
empty or both fields containing the text, respectively. The expected output is
correct and I don't think it should be changed, so this attempt to fix breaks
text drag and drop, but I'm not sure why.


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list