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

Issue 773517 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

[MD extensions] toggle buttons sometimes don't respond

Project Member Reported by dschuyler@chromium.org, Oct 10 2017

Issue description

enable md-extensions flag
open chrome://extensions
click on the Developer toggle button

Problem if the mouse is not kept steady, the click may have no effect.

Specifically clicking and moving a pixel with the current toggle direction will not toggle the button (i.e. left if the toggle is left; right if the toggle is right).

I'm guessing this is for 'flick' detection to toggle the control.

Suggestion: allow a small amount of 'play' in the click to be considered a non-moving click. Say 4px or so from the click point.
 

Comment 1 by dpa...@chromium.org, Oct 10 2017

Described behavior is intentional, happy to further refine it. Explaining logic below:

If the user holds down the button and moves, the toggle will move only if a move of at least 4px is detected. See [1]. This means that if less than 4px is detected we consider that the user changed their mind and don't want to toggle.

[1] https://cs.chromium.org/chromium/src/ui/webui/resources/cr_elements/cr_toggle/cr_toggle.js?l=71.

Comment 2 by dpa...@chromium.org, Oct 10 2017

I should add. If the user moves the direction towards the "wrong" direction, meaning the direction where the toggle is already at, we don't change the state. We initially did, and it felt fairly strange. Current behavior AFAIK also matches what paper-toggle-button did.
Sorry, but I'm seeing something different.

Please consider checking paper-toggle-button. Empirically it is doing the opposite behavior for me.

The paper-toggle-button behavior appears to be: If the end point is near the start point it's considered a stationary click. If it strays too far from the start point it's considered a change of mind.

Comment 4 by dpa...@chromium.org, Oct 11 2017

Owner: dpa...@chromium.org
Status: Assigned (was: Untriaged)
Per offline discussion with @dschuyler, I'll upload a CL that modifies the behavior to cause a mousemove+release to still toggle the state, if the move is very small, and we can try it locally and decide if we want this.

Comment 5 by dpa...@chromium.org, Oct 11 2017

Status: Started (was: Assigned)
Project Member

Comment 7 by bugdroid1@chromium.org, Oct 13 2017

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

commit 65d5f3e8870705a70bea699328945e309bde6965
Author: dpapad <dpapad@chromium.org>
Date: Fri Oct 13 21:48:00 2017

WebUI cr-toggle: Account for accidental pointermove (shaky hands) gesture.

Tweak the logic that decides when a pointermove is considered intentional, to
allow for a 5px accidental move.

The following sequence now toggles the state, whereas before it did not.
pointerdown -> pointermove in any direction by 4 or less px -> pointerup

Bug:  773517 
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I54b5364b7e82b5c24852699cdf7061893b63c0fa
Reviewed-on: https://chromium-review.googlesource.com/714196
Reviewed-by: Dave Schuyler <dschuyler@chromium.org>
Commit-Queue: Demetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#508829}
[modify] https://crrev.com/65d5f3e8870705a70bea699328945e309bde6965/chrome/test/data/webui/cr_elements/cr_toggle_test.js
[modify] https://crrev.com/65d5f3e8870705a70bea699328945e309bde6965/ui/webui/resources/cr_elements/cr_toggle/cr_toggle.js

Comment 8 by dpa...@chromium.org, Oct 23 2017

Status: Fixed (was: Started)

Sign in to add a comment