每次双击已设置的画布时,都会出现此错误:
Error in event handler for 'undefined': IndexSizeError: DOM Exception 1 Error: Index or size was negative, or greater than the allowed value.
at M (chrome-extension://mgijmajocgfcbeboacabfgobmjgjcoja/content_js_min.js:17:154)
at null.<anonymous> (chrome-extension://mgijmajocgfcbeboacabfgobmjgjcoja/content_js_min.js:19:417)
at chrome-extension://mgijmajocgfcbeboacabfgobmjgjcoja/content_js_min.js:1:165
at <error: illegal access>
at Event.dispatchToListener (event_bindings:356:21)
at Event.dispatch_ (event_bindings:342:27)
at Event.dispatch (event_bindings:362:17)
at Object.chromeHidden.Port.dispatchOnMessage (miscellaneous_bindings:273:22)
我相信是谷歌词典。我该如何防止这种情况?我已经阻止默认设置是这样的:
canvas.addEventListener('mousedown', function(evt) {
evt.preventDefault();}, false);
canvas.addEventListener('mouseup', function(evt) {
evt.preventDefault();}, false);
不幸的是,似乎两者都没有任何效果,感谢您的帮助!
编辑:应该添加这是在 Chrome
编辑:刚刚发现它特定于 Chrome 版本 28.0.1500.71,似乎不会影响早期版本。