mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-01 22:07:41 +00:00
Bug 796009 - Streamline keyboard nav of markup in inspector; r=jwalker
This commit is contained in:
parent
8222ea808f
commit
7552084df5
@ -149,10 +149,24 @@ MarkupView.prototype = {
|
||||
this.navigate(this._containers.get(this._rootNode.firstChild));
|
||||
break;
|
||||
case Ci.nsIDOMKeyEvent.DOM_VK_LEFT:
|
||||
this.collapseNode(this._selectedContainer.node);
|
||||
if (this._selectedContainer.expanded) {
|
||||
this.collapseNode(this._selectedContainer.node);
|
||||
} else {
|
||||
let parent = this._selectionWalker().parentNode();
|
||||
if (parent) {
|
||||
this.navigate(parent.container);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case Ci.nsIDOMKeyEvent.DOM_VK_RIGHT:
|
||||
this.expandNode(this._selectedContainer.node);
|
||||
if (!this._selectedContainer.expanded) {
|
||||
this.expandNode(this._selectedContainer.node);
|
||||
} else {
|
||||
let next = this._selectionWalker().nextNode();
|
||||
if (next) {
|
||||
this.navigate(next.container);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case Ci.nsIDOMKeyEvent.DOM_VK_UP:
|
||||
let prev = this._selectionWalker().previousNode();
|
||||
|
@ -30,6 +30,14 @@ function test() {
|
||||
["right", "node7"],
|
||||
["down", "*text*"],
|
||||
["down", "node8"],
|
||||
["left", "node7"],
|
||||
["left", "node7"],
|
||||
["right", "node7"],
|
||||
["right", "*text*"],
|
||||
["right", "*text*"],
|
||||
["down", "node8"],
|
||||
["right", "node8"],
|
||||
["left", "node8"],
|
||||
["down", "node9"],
|
||||
["down", "node10"],
|
||||
["down", "node11"],
|
||||
|
Loading…
x
Reference in New Issue
Block a user