Bug 1022780 - Cmd+H triggers 'hide markup', should only be triggered by H. r=pbrosset

This commit is contained in:
Brian Grinstead 2014-06-16 07:43:00 -04:00
parent ec39e53aa6
commit d9e8bec862

View File

@ -361,11 +361,15 @@ MarkupView.prototype = {
switch(aEvent.keyCode) {
case Ci.nsIDOMKeyEvent.DOM_VK_H:
let node = this._selectedContainer.node;
if (node.hidden) {
this.walker.unhideNode(node).then(() => this.nodeChanged(node));
if (aEvent.metaKey || aEvent.shiftKey) {
handled = false;
} else {
this.walker.hideNode(node).then(() => this.nodeChanged(node));
let node = this._selectedContainer.node;
if (node.hidden) {
this.walker.unhideNode(node).then(() => this.nodeChanged(node));
} else {
this.walker.hideNode(node).then(() => this.nodeChanged(node));
}
}
break;
case Ci.nsIDOMKeyEvent.DOM_VK_DELETE: