You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// (1) Firefox supports pointer but not by default, only MS browsers are reliable on pointer
// events currently. So we dont use that on other browsers unless tested sufficiently.
// For example, in iOS 13 Mobile Chromium 78, if the touching behavior starts page
// scroll, the pointermove event can not be fired any more. That will break some
// features like "pan horizontally to move something and pan vertically to page scroll".
// The horizontal pan probably be interrupted by the casually triggered page scroll.
// (2) Although IE 10 supports pointer event, it use old style and is different from the
// standard. So we exclude that. (IE 10 is hardly used on touch device)
开发时遇到一个问题:
上面这段代码(模拟拖拽场景,因为要拖拽的元素很小,所以是给document监听mousemove事件)在Edge浏览器中,mousedown之后,如果不mouseup,mousemove事件不会触发,但是在Chrome中是正常的。在Chrome中e.event的类型是MouseEvent;而Edge中e.event的类型是PointerEvent,然后调用了e.stop取消了事件,导致了mousemove不会再被触发。
问题的根因是,zrender的env的代码中判断pointerEventsSupported要加上ua判断,限制pointerEventsSupported只有在edge和ie可用,为什么要这样写呢?
The text was updated successfully, but these errors were encountered: