Bug 84501 - REGRESSION (r94497): Pressing Command+A when inline (Marked Text) is not empty will clean whole content
: REGRESSION (r94497): Pressing Command+A when inline (Marked Text) is not empt...
Status: RESOLVED FIXED
: WebKit
Text
: 528+ (Nightly build)
: Macintosh Unspecified
: P1 Major
Assigned To:
:
: InRadar
:
:
  Show dependency treegraph
 
Reported: 2012-04-20 15:51 PST by
Modified: 2012-04-26 23:44 PST (History)


Attachments
Fixes the bug (4.46 KB, patch)
2012-04-26 22:53 PST, Ryosuke Niwa
ap: review+
Review Patch | Details | Formatted Diff | Diff


Note

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


Description From 2012-04-20 15:51:22 PST
Steps to reproduce:
1. Type anything in any editable content (contenteditable, textarea, Mail.app etc.)
2. Type anything else with an input method using inline input (such as Kotoeri).
3. Hit Cmd+A

Results: entire editable content disappears.
Expected results: input area is confirmed, all text is selected.

<rdar://problem/11242705>
------- Comment #1 From 2012-04-24 16:33:52 PST -------
Ryosuke, would you be willing to look into this?
------- Comment #2 From 2012-04-26 16:15:23 PST -------
Interesting this bug doesn't reproduce on Chrome because we ignore Cmd+A.
------- Comment #3 From 2012-04-26 16:45:02 PST -------
We're hitting:

    // If text is empty, then delete the old composition here.  If text is non-empty, InsertTextCommand::input
    // will delete the old composition with an optimized replace operation.
    if (text.isEmpty())
        TypingCommand::deleteSelection(m_frame->document(), 0);
------- Comment #4 From 2012-04-26 22:53:56 PST -------
Created an attachment (id=139135) [details]
Fixes the bug
------- Comment #5 From 2012-04-26 23:04:36 PST -------
(From update of attachment 139135 [details])
Thank you!

I suggest putting this test in editing/input. Ports that don't implement textInputController often skip the whole directory, so it's less book-keeping for everyone.
------- Comment #6 From 2012-04-26 23:07:23 PST -------
(In reply to comment #5)
> (From update of attachment 139135 [details] [details])
> Thank you!
> 
> I suggest putting this test in editing/input. Ports that don't implement textInputController often skip the whole directory, so it's less book-keeping for everyone.

Okay, will do.
------- Comment #7 From 2012-04-26 23:44:31 PST -------
Committed r115409: <http://trac.webkit.org/changeset/115409>