mirror of
https://github.com/google/blockly.git
synced 2026-01-07 09:00:11 +01:00
Switch to goog.events.BrowserFeature.POINTER_EVENTS
This commit is contained in:
@@ -53,7 +53,9 @@ goog.require('Blockly.WorkspaceSvg');
|
||||
goog.require('Blockly.constants');
|
||||
goog.require('Blockly.inject');
|
||||
goog.require('Blockly.utils');
|
||||
|
||||
goog.require('goog.color');
|
||||
goog.require('goog.events.BrowserFeature');
|
||||
goog.require('goog.userAgent');
|
||||
|
||||
|
||||
@@ -452,7 +454,8 @@ Blockly.bindEventWithChecks_ = function(node, name, thisObject, func,
|
||||
|
||||
var bindData = [];
|
||||
// Don't register the mouse event if an equivalent pointer event is supported.
|
||||
if (!window.PointerEvent || !(name in Blockly.Touch.TOUCH_MAP)) {
|
||||
if (!goog.events.BrowserFeature.POINTER_EVENTS ||
|
||||
!(name in Blockly.Touch.TOUCH_MAP)) {
|
||||
node.addEventListener(name, wrapFunc, false);
|
||||
bindData.push([node, name, wrapFunc]);
|
||||
}
|
||||
@@ -501,7 +504,8 @@ Blockly.bindEvent_ = function(node, name, thisObject, func) {
|
||||
|
||||
var bindData = [];
|
||||
// Don't register the mouse event if an equivalent pointer event is supported.
|
||||
if (!window.PointerEvent || !(name in Blockly.Touch.TOUCH_MAP)) {
|
||||
if (!goog.events.BrowserFeature.POINTER_EVENTS ||
|
||||
!(name in Blockly.Touch.TOUCH_MAP)) {
|
||||
node.addEventListener(name, wrapFunc, false);
|
||||
bindData.push([node, name, wrapFunc]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user