chrome can't handle mouse drag image in mobile website,but
Reported by
a32824...@gmail.com,
May 10 2018
|
||||||
Issue descriptionExample 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.
,
May 10 2018
,
May 10 2018
,
Jun 13 2018
so,can any one confirmed it.
,
Jun 14 2018
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 :)
,
Jun 19 2018
emm....I means the image can't scroll with mouse but can respond with the finger touch.
,
Jun 19 2018
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.
,
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.
,
Jun 20 2018
I'd say the page is not designed to work with mouse. .. mustaq@, any thoughts about this usage?
,
Jun 20 2018
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 |
||||||
Comment 1 by a32824...@gmail.com
, May 10 2018the 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