Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[兼容性] 35. 捕获事件 #820

Open
qiilee opened this issue Nov 28, 2019 · 0 comments
Open

[兼容性] 35. 捕获事件 #820

qiilee opened this issue Nov 28, 2019 · 0 comments

Comments

@qiilee
Copy link
Member

qiilee commented Nov 28, 2019

问题说明:
FF 没有 setCapture()、releaseCapture()方法

解决方法:
IE:

obj.setCapture();
obj.releaseCapture();

FF:

window.captureEvents(Event.MOUSEMOVE | Event.MOUSEUP);
window.releaseEvents(Event.MOUSEMOVE | Event.MOUSEUP);
if (!window.captureEvents) {
  o.setCapture();
} else {
  window.captureEvents(Event.MOUSEMOVE | Event.MOUSEUP);
}
if (!window.captureEvents) {
  o.releaseCapture();
} else {
  window.releaseEvents(Event.MOUSEMOVE | Event.MOUSEUP);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant