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

Issue 829135 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Jul 3
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: ----
Proj-VR
Proj-XR
Proj-XR-VR



Sign in to add a comment

Button click UI is not shown in VR browsing

Project Member Reported by dbbrooks@chromium.org, Apr 4 2018

Issue description

Chrome: 67.0.3387.0
VRCore: 1.13.185188193
Android N
Device: S8+

What steps will reproduce the problem?
(1) In VR browsing, go to https://serviceworke.rs/push-simple_demo.html
(2) click on the "Try to conquer Italy!" button

What is the expected result? When you click on the button in 2D browsing, the button briefly changes highlighting to show a click event has occurred. 

What happens instead? The UI doesn't change at all.

This also occurs on button elements on other pages. E.g. https://rsolomakhin.github.io/autofill/
 
Blockedon: 733656
Labels: M-68 Pri-2
Owner: asimjour@chromium.org
Status: Available (was: Untriaged)
Assigning to asimjour@chromium.org, based on ownership of the blocking bug.
Labels: -M-68 M-69
Owner: acondor@chromium.org
Assigning to acondor.
@acondor, this should be fixed after you land your WIP on input.
I was able to reproduce this also in desktop, when clicking very fast. However, I couldn't reproduce in 2D android. The event callback for the click still runs every time.
Blockedon: -733656
Cc: nzolghadr@chromium.org
Labels: -Pri-2 Pri-3
I just talked with nzolghadr@ and this is expected when the click up happens faster than the refresh rate. This is not reproducible in android 2D because it's very difficult to touch that fast as opposed to clicking.
Owner: ----
Status: WontFix (was: Available)

Comment 7 by eirage@chromium.org, Jun 25 2018

A stupid question: We do have some mechanism in EventHandler to ensure the active state is shown for gesture type events. (I assume vr is now using stylus type event instead of mouse type)
Navid, do you know why this is not working correctly?

See: https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/input/event_handler.cc?dr=C&sq=package:chromium&g=0&l=1700
I don't think we have that delay for the mouse path.
I asked Aldo about whether they get the hover effect when moving the pointer around and it seems that they do. As I believe we don't have hover effects for the touch event movements then they must be using the mouse event path I believe (regardless of the type of the pointer type). Aldo can you confirm?

Comment 9 by eirage@chromium.org, Jun 27 2018

Cc: eirage@chromium.org
My understanding is the logic is similar to what we have on direct manipulation: when hover, send mouse events; when button down, send touch events. So they can support both scroll and hover. 
Looking into the code I'm not sure whether vr is using the same gesture provider :) 
Cc: acondor@chromium.org
VR injects MotionEvents, but we use TOOL_TYPE_STYLUS for both hover and touch events. What you are saying is that if we use FINGER, then the event handler should add the delay?
It is less about what type you set but rather which path you inject the input. So for example in here the ui::MotionEventAndroid either comes in OnTouchEvent or OnMouseEvent:

https://cs.chromium.org/chromium/src/conten render_widget_host_view_android t/browser/renderer_host/.cc

and both of them handle MotionEventAndroid. Although the logic on how you inject the input might rely on the type of the MotionEvent you have. My guess was that since you are getting the hover effect for when you move the pointer around it had to come from the mouse path. But what Ella says is also definitely a possibility.

If you can give me a few pointers on where your code lives and where you inject the input we might be able to follow the code path to figure what the logic is and how the events are being routed.




A easier way to figure out: do you show context menu when long press?

BTW I don't think you'd want to use FINGER, stylus is better for your case ;p
Cc: mustaq@chromium.org
Status: Available (was: WontFix)
cc mustaq@ as he might remember what happens ot stylus here.

The code that decides when to send the mouse events vs touch events is here:

https://cs.chromium.org/chromium/src/ui/android/java/src/org/chromium/ui/base/EventForwarder.java?type=cs&q=TODO%5C(mustaq%5C):+file:%5C.java&g=0&l=65


It does seem that we are missing TOOL_TYPE_STYLUS in the check. Which makes me wonder how you are getting the hovering effect. From this issue 592082 it does seem that we are sending TOOL_TYPE_STYLUS in contact from touch and from mouse path when it is not in contact (as Ella said). But I don't see that logic in the code above. mustaq@ added that part of the code back then. Mustaq, Do you remember where we get that logic?

Status: WontFix (was: Available)
I checked with Mustaq last week. As he remember, we only treats type mouse as mouse.

And also, the looks like vr handle hover and non-hover event is different. The code here: https://cs.chromium.org/chromium/src/chrome/browser/vr/platform_ui_input_delegate.cc?q=chrome/browser/vr/platform_ui_input_delegate.h&sq=package:chromium&dr=C&l=54

I think we don't need to worry about this issue since  issue 733656  is resolved.
The code in the platform_input_delegate is being refactored to remove the confusion with the used blink structures. Please refer to https://cs.chromium.org/chromium/src/chrome/browser/android/vr/android_ui_gesture_target.cc to see the actual injected events.  issue 733656  ended up being unrelated.

Sign in to add a comment