New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 652916 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug

Blocking:
issue 615435



Sign in to add a comment

View#startActionMode() does not get triggered when an empty contenteditable element is long-clicked.

Project Member Reported by amaralp@chromium.org, Oct 5 2016

Issue description

- Build Number: MRA58V
- Device: Nexus 5

PRECONDITION:
Nothing in Clipdata (so that "Paste" does not show in the contextual action mode menu)

STEPS TO REPRODUCE:
1. Make sure "Vibrate on touch" is enabled. System Settings > Sound & notification > Other sounds > Vibrate on touch.
2. Create an contentEditable element. (e.g. http://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_global_contenteditable)
3. Empty the contenteditable element by deleting every character in the element.
4. Try to long-click the element.
5. BUG: View#startActionMode() is not called (no vibrate on long-click)

EXPECTED RESULTS:
View#startActionMode() should be called even though there is no menu to show. (There should be a vibrate)

OBSERVED RESULTS:
View#startActionMode() is not called. (no vibrate)

NUMBER OF TIMES YOU WERE ABLE TO REPRODUCE(e.g. 3/10): 10/10

ADDITIONAL INFORMATION:
I added a custom action mode via View#startActionMode(), but startActionMode() never gets called if there is no default action (e.g. Select all, Paste, etc).

https://buganizer.corp.google.com/u/1/issues/27746617

 
Blocking: 615435
Blockedon: 633281

Comment 3 by aelias@chromium.org, Oct 24 2016

Blockedon: -633281
Project Member

Comment 4 by bugdroid1@chromium.org, Oct 25 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/31c0e1a63f0a1a09374d0c2eb441286a532789e5

commit 31c0e1a63f0a1a09374d0c2eb441286a532789e5
Author: amaralp <amaralp@chromium.org>
Date: Tue Oct 25 01:17:28 2016

Start action mode even if clipboard is empty

Previously clank would not call View#startActionMode for a FloatingPastePopup menu
if the copy/paste clipboard was empty (because there would be nothing in the menu).
This is a problem because apps using WebView may want to add items to the
FloatingPastePopup menu (using startActionMode) even if the clipboard is empty.

This patch makes clank call View#startActionMode and make an empty menu when there
is nothing to paste.

BUG= 652916 

Review-Url: https://codereview.chromium.org/2443963003
Cr-Commit-Position: refs/heads/master@{#427210}

[modify] https://crrev.com/31c0e1a63f0a1a09374d0c2eb441286a532789e5/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
[modify] https://crrev.com/31c0e1a63f0a1a09374d0c2eb441286a532789e5/content/public/android/java/src/org/chromium/content/browser/WebActionModeCallback.java

Comment 5 by aelias@chromium.org, Oct 25 2016

Labels: Merge-Request-55

Comment 6 by dimu@chromium.org, Oct 25 2016

Labels: -Merge-Request-55 Merge-Approved-55 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M55 (branch: 2883)

Comment 7 by aelias@chromium.org, Oct 25 2016

Locally verified http://b/27746617 is fixed with a local build of system_webview_google_apk with patch applied on Nexus 7 2013/MOB30X.
Project Member

Comment 8 by bugdroid1@chromium.org, Oct 25 2016

Labels: -merge-approved-55 merge-merged-2883
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6e75c14dbaacd7cafcb9a80f0aef1d942da19875

commit 6e75c14dbaacd7cafcb9a80f0aef1d942da19875
Author: Alexandre Elias <aelias@chromium.org>
Date: Tue Oct 25 19:37:38 2016

Start action mode even if clipboard is empty

Previously clank would not call View#startActionMode for a FloatingPastePopup menu
if the copy/paste clipboard was empty (because there would be nothing in the menu).
This is a problem because apps using WebView may want to add items to the
FloatingPastePopup menu (using startActionMode) even if the clipboard is empty.

This patch makes clank call View#startActionMode and make an empty menu when there
is nothing to paste.

BUG= 652916 

Review-Url: https://codereview.chromium.org/2443963003
Cr-Commit-Position: refs/heads/master@{#427210}
(cherry picked from commit 31c0e1a63f0a1a09374d0c2eb441286a532789e5)

Review URL: https://codereview.chromium.org/2454443002 .

Cr-Commit-Position: refs/branch-heads/2883@{#292}
Cr-Branched-From: 614d31daee2f61b0180df403a8ad43f20b9f6dd7-refs/heads/master@{#423768}

[modify] https://crrev.com/6e75c14dbaacd7cafcb9a80f0aef1d942da19875/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
[modify] https://crrev.com/6e75c14dbaacd7cafcb9a80f0aef1d942da19875/content/public/android/java/src/org/chromium/content/browser/WebActionModeCallback.java

Comment 9 by aelias@chromium.org, Oct 25 2016

Status: Fixed (was: Started)
verified on nexus 6 / MOB31L and Nexus 5 / MOB31H vs M56
verified on moto G 3rd gen / MPI24.65-25  vs latest M55
Project Member

Comment 12 by bugdroid1@chromium.org, Oct 27 2016

Labels: merge-merged-2840
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6e75c14dbaacd7cafcb9a80f0aef1d942da19875

commit 6e75c14dbaacd7cafcb9a80f0aef1d942da19875
Author: Alexandre Elias <aelias@chromium.org>
Date: Tue Oct 25 19:37:38 2016

Start action mode even if clipboard is empty

Previously clank would not call View#startActionMode for a FloatingPastePopup menu
if the copy/paste clipboard was empty (because there would be nothing in the menu).
This is a problem because apps using WebView may want to add items to the
FloatingPastePopup menu (using startActionMode) even if the clipboard is empty.

This patch makes clank call View#startActionMode and make an empty menu when there
is nothing to paste.

BUG= 652916 

Review-Url: https://codereview.chromium.org/2443963003
Cr-Commit-Position: refs/heads/master@{#427210}
(cherry picked from commit 31c0e1a63f0a1a09374d0c2eb441286a532789e5)

Review URL: https://codereview.chromium.org/2454443002 .

Cr-Commit-Position: refs/branch-heads/2883@{#292}
Cr-Branched-From: 614d31daee2f61b0180df403a8ad43f20b9f6dd7-refs/heads/master@{#423768}

[modify] https://crrev.com/6e75c14dbaacd7cafcb9a80f0aef1d942da19875/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
[modify] https://crrev.com/6e75c14dbaacd7cafcb9a80f0aef1d942da19875/content/public/android/java/src/org/chromium/content/browser/WebActionModeCallback.java

Comment 13 by dimu@google.com, Nov 4 2016

Labels: -merge-merged-2840
[Automated comment] removing mislabelled merge-merged-2840

Sign in to add a comment