Skip to content

Commit

Permalink
Correct check for unset canBubble (#2748)
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiasrw authored and lukeis committed Sep 9, 2016
1 parent 2683fbc commit eb6c8b2
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ var browserbot = {


triggerEvent : function(element, eventType, canBubble, controlKeyDown, altKeyDown, shiftKeyDown, metaKeyDown) {
canBubble = (typeof(canBubble) == undefined) ? true : canBubble;
canBubble = (typeof(canBubble) == 'undefined') ? true : canBubble;
if (element.fireEvent && element.ownerDocument && element.ownerDocument.createEventObject) { // IE
var evt = this.createEventObject(element, controlKeyDown, altKeyDown, shiftKeyDown, metaKeyDown);
element.fireEvent('on' + eventType, evt);
Expand All @@ -91,7 +91,7 @@ var browserbot = {

triggerKeyEvent : function(element, eventType, keySequence, canBubble, controlKeyDown, altKeyDown, shiftKeyDown, metaKeyDown) {
var keycode = this.getKeyCodeFromKeySequence(keySequence);
canBubble = (typeof(canBubble) == undefined) ? true : canBubble;
canBubble = (typeof(canBubble) == 'undefined') ? true : canBubble;
if (element.fireEvent && element.ownerDocument && element.ownerDocument.createEventObject) { // IE
var keyEvent = this.createEventObject(element, controlKeyDown, altKeyDown, shiftKeyDown, metaKeyDown);
keyEvent.keyCode = keycode;
Expand Down Expand Up @@ -125,7 +125,7 @@ var browserbot = {
var screenX = 0;
var screenY = 0;

canBubble = (typeof(canBubble) == undefined) ? true : canBubble;
canBubble = (typeof(canBubble) == 'undefined') ? true : canBubble;
if (element.fireEvent && element.ownerDocument && element.ownerDocument.createEventObject && this.getInternetExplorerVersion() < 9) { //IE
var evt = this.createEventObject(element, this.controlKeyDown, this.altKeyDown, this.shiftKeyDown, this.metaKeyDown);
evt.detail = 0;
Expand Down

0 comments on commit eb6c8b2

Please sign in to comment.