Improve check for when to ignore mouse events
The browser tells us which element was under the cursor, so we don't have to calculate it ourselves.
This commit is contained in:
parent
86d15a4929
commit
6ffdfd3aa7
|
@ -330,12 +330,8 @@
|
|||
if (!this._focused) { return true; }
|
||||
|
||||
var evt = (e ? e : window.event);
|
||||
var pos = Util.getEventPosition(e, this._target, this._scale);
|
||||
|
||||
/* Stop propagation if inside canvas area */
|
||||
if ((pos.realx >= 0) && (pos.realy >= 0) &&
|
||||
(pos.realx < this._target.offsetWidth) &&
|
||||
(pos.realy < this._target.offsetHeight)) {
|
||||
if (evt.target == this._target) {
|
||||
//Util.Debug("mouse event disabled");
|
||||
Util.stopEvent(e);
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue