js/foundation/eventmanager/eventmanager.js in rsence-2.0.2.13 vs js/foundation/eventmanager/eventmanager.js in rsence-2.0.3.14
- old
+ new
@@ -600,11 +600,11 @@
_newActiveControl = _this.focusOptions[i].ctrl;
}
if ((_this.focusOptions[i].draggable === true) && _this.dragItems.indexOf(i) === -1) {
_startDragElementIds.push(i);
}
- else if (_this.focusOptions[i].mouseDown === true) {
+ if (_this.focusOptions[i].mouseDown === true) {
_mouseDownElementIds.push(i);
}
}
}
// Handle the active control selection.
@@ -634,11 +634,11 @@
};
Event.stop(e);
}
// Stop the event only when we are hovering over some control, allows normal DOM events to co-exist.
if (this.enableDroppableChecks) {
- if ((_stopEvent === 0) && (_this.hovered.length !== 0) && (_newActiveControl && (_newActiveControl.textElemId === false))) {
+ if ((_stopEvent === 0) && (_this.hovered.length !== 0) && _newActiveControl) {
Event.stop(e);
}
}
return true;
},
@@ -658,20 +658,25 @@
_newActiveControl = null,
// The startDrag and mouseDown event receivers are first collected into
// these arrays and the events are sent after the active control status has
// been changed.
_clickElementIds = [];
- _this._modifiers(e);
+ _this._modifiers(e);
if (_isLeftButton === undefined) {
_isLeftButton = Event.isLeftClick(e);
}
- if (_isLeftButton) {
- _this.status[_this.button1] = true;
+ if (BROWSER_TYPE.ie) {
+ _isLeftButton = true; // IE only supports click on left button
}
- else {
- _this.status[_this.button2] = true;
+ // Prevent right-click event from triggering click.
+ // Only firefox seems to fire the click-event with the
+ // right mouse button, so this prevents it from happening
+ // in the name of uniform behavior.
+ if(!_isLeftButton){
+ return true;
}
+ _this.status[_this.button1] = true;
for (; i !== _this.focused.length; i++) {
if (_this.focused[i] === true) {
// Set the active control to the currently focused item.
if (_this.focusOptions[i].ctrl.enabled) {
_newActiveControl = _this.focusOptions[i].ctrl;
@@ -691,21 +696,16 @@
_stopEvent--;
}
}
// Stop the event only when we are hovering over some control, allows normal DOM events to co-exist.
if (_this.enableDroppableChecks) {
- if ((_stopEvent === 0) && (_this.hovered.length !== 0) && (_newActiveControl && (_newActiveControl.textElemId === false))) {
+ if ((_stopEvent === 0) && (_this.hovered.length !== 0) && _newActiveControl) {
Event.stop(e);
}
}
//if(_this.hovered.length!==0){Event.stop(e);}
- if(_isLeftButton){
- _this.status[_this.button1] = false;
- }
- else {
- _this.status[_this.button2] = false;
- }
+ _this.status[_this.button1] = false;
return true;
},
/** Changes active ctrl.
* The previous active ctrl gets the _lostActiveStatus pseudo-event,
@@ -900,14 +900,21 @@
}
},
/* Alternative right button detection, wrapper for the mouseDown method */
contextMenu: function(e) {
- EVENT.mouseDown(e, false);
+ // EVENT.mouseDown(e, false);
Event.stop(e);
- if(Event.isLeftClick(e)){
- EVENT.status[EVENT.button2] = false;
- }
+
+ /***
+
+ IMPLEMENT SEPARATE CONTEXT-MENU EVENT HANDLING HERE
+
+ ***/
+
+ // if(Event.isLeftClick(e)){
+ // EVENT.status[EVENT.button2] = false;
+ // }
},
_cmdKeys: [
224, // Mozilla Left or Right Command Key
219, // Opera Left Windows Key