New issue
Advanced search Search tips

Issue 841662 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

chrome can't handle mouse drag image in mobile website,but

Reported by a32824...@gmail.com, May 10 2018

Issue description

Example URL:
http://m.baidu.com/#iact=wiseindex%2Ftabs%2Fnews%2Factivity%2Fnewsdetail%3D%257B%2522linkData%2522%253A%257B%2522name%2522%253A%2522iframe%252Fmib-iframe%2522%252C%2522id%2522%253A%2522feed%2522%252C%2522index%2522%253A0%252C%2522url%2522%253A%2522https%253A%252F%252Fmbd.baidu.com%252Fnewspage%252Fdata%252Fimagelandingpage%253Fs_type%253Dpicnews%2526context%253D%25257B%252522nid%252522%25253A%252522news_10260888199819432947%252522%25257D%2526pageType%253D1%2526n_type%253D1%2526p_from%253D2%2526nid%253D10260888199819432947%2526innerIframe%253D1%2522%252C%2522isThird%2522%253Afalse%252C%2522title%2522%253Anull%257D%257D

Steps to reproduce the problem:
1.OTG with mouse.
2.access some mobile website.
3.can't use mouse to drag or move image in website.

What is the expected behavior?
chrome can handle the mouse move and drag.User can't scroll the image....

What went wrong?
I think the mouse event must compatible with touch event in android platform.

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? No 

Does this work in other browsers? Yes

Chrome version: 65.0.3325.162  Channel: stable
OS Version: 65.0.3325.109
Flash Version: 

The pc chrome can't handle it too, I think it's ok.
But if the user use android chrome and just OTG a mouse,it must be work.
 

Comment 1 by a32824...@gmail.com, May 10 2018

the chrome 53 look good,It think this file cause problem:
 
chromium/src/ui/android/java/src/org/chromium/ui/base/EventForwarder.java

    public boolean onTouchEvent(MotionEvent event) {
        // TODO(mustaq): Should we include MotionEvent.TOOL_TYPE_STYLUS here?
        // crbug.com/592082
        if (event.getToolType(0) == MotionEvent.TOOL_TYPE_MOUSE) {
            // Skip firing mouse events in the follwoing cases:
            // - In Android L and below, where mouse button info is incomplete.
            // - A move w/o a button press, which represents a trackpad scroll. Real mouse moves w/o
            //   buttons goes to onHoverEvent.
            final int apiVersion = Build.VERSION.SDK_INT;
            final boolean isTouchpadScroll = event.getButtonState() == 0
                    && (event.getActionMasked() == MotionEvent.ACTION_DOWN
                               || event.getActionMasked() == MotionEvent.ACTION_MOVE
                               || event.getActionMasked() == MotionEvent.ACTION_UP);

            if (apiVersion >= android.os.Build.VERSION_CODES.M && !isTouchpadScroll) {
                return onMouseEvent(event);
            }
        }

        final boolean isTouchHandleEvent = false;
        return sendTouchEvent(event, isTouchHandleEvent);
    }


when on mouse drag or move,it also has the touch event, but this code filter the touch event and call onMouseEvent method.Then the webpage can't respond any operation.

when I remove it,it will cause an other problem and I have no idea how to fix


Comment 2 by junov@chromium.org, May 10 2018

Components: -Blink Blink>Input

Comment 3 by eirage@chromium.org, May 10 2018

Labels: Hotlist-Input-Dev
Owner: eirage@chromium.org
Status: Assigned (was: Unconfirmed)

Comment 4 by a32824...@gmail.com, Jun 13 2018

so,can any one confirmed it.

Comment 5 by eirage@chromium.org, Jun 14 2018

Cc: nzolghadr@chromium.org
Components: Blink>DataTransfer
The code you pointed doesn't cause the problem. The issue here is chrome on Android doesn't support drag anything other than data transfer format "text". So it's not able to drag a normal image with mouse on Android.
If the image has `event.dataTransfer.setData("text", any_drag_data)`, you should be able to drag it.

I'll work on fixing this in probably next month, but not sure when :)


Comment 6 by a32824...@gmail.com, Jun 19 2018

emm....I means the image can't scroll with mouse but can respond with the finger touch.

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

Components: -Blink>DataTransfer
Status: WontFix (was: Assigned)
I see. Before Chrome 59, mouse input appeared as touch is because we had incomplete mouse handling code in Chrome.  For consistent with mouse behavior on other platform, mouse on Android is now behavior as mouse on desktop. You should be able to use mouse wheel to scroll a page.

Comment 8 by a32824...@gmail.com, Jun 20 2018

yes,I use mouse whell to scroll a page normally.

But in this case,mouse wheel not invalid because it only use for scroll down and scroll up. That website is special,the image only scroll left or right,so the mouse wheel not work. 

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

Cc: mustaq@chromium.org
I'd say the page is not designed to work with mouse. .. mustaq@, any thoughts about this usage?
I agree with eirage@: the page seemes not designed for mouse.

We had an incomplete event path for mouse in Android so those events used to appear as touch, and pages would only see broken mouse events.  It was fixed in Chrome 58: https://www.chromestatus.com/feature/5642080642662400

We recommend using PointerEvents for pages that need to support mouse and touch (and stylus) interactions.

Sign in to add a comment