Skip to content

Commit

Permalink
Code Changes per code review comment
Browse files Browse the repository at this point in the history
- Changed fix from addressing the browser specific behavior and instead
  addressed the parent issue of NavKey events being relayed when they are not
  really NavKey events. This was per code review comment by @jpwhite4
  • Loading branch information
ryanrath committed Apr 27, 2017
1 parent c4a6bce commit 5e9e641
Showing 1 changed file with 6 additions and 21 deletions.
27 changes: 6 additions & 21 deletions html/gui/js/modules/metric_explorer/MetricExplorer.js
Original file line number Diff line number Diff line change
Expand Up @@ -5674,7 +5674,12 @@ Ext.extend(XDMoD.Module.MetricExplorer, XDMoD.PortalModule, {
return true;
}

return h.call(this.scope || this, e, this.menu);
// Ensure that we only call the KeyNav handlers if this is a NavKey Press.
if (e.isNavKeyPress()) {
return h.call(this.scope || this, e, this.menu);
}

return true;
};

/**
Expand All @@ -5694,26 +5699,6 @@ Ext.extend(XDMoD.Module.MetricExplorer, XDMoD.PortalModule, {
target.value += String.fromCharCode(key);
}
};

/**
* Firefox + Ext 3.4 === '%' being interpreted as the 'left' key.
* This resulted in the code after the 'if' being executed. Which,
* is somewhat odd behavior to say the least ( While viewing the
* site in firefox, type '%' into a text box, have the whole menu
* close.). This override fixes that behavior
**/
this.chartOptionsMenu.keyNav.left = function (e, m) {
// Gecko === Firefox
if (Ext.isGecko === true) {
return true;
}

m.hide();
if (m.parentMenu && m.parentMenu.activeItem) {
m.parentMenu.activeItem.active();
}
return true;
};
}

this.chartStatusButton = new XDMoD.Module.MetricExplorer.StatusButton({
Expand Down

0 comments on commit 5e9e641

Please sign in to comment.