diff options
Diffstat (limited to 'WebCore/inspector/front-end/treeoutline.js')
-rw-r--r-- | WebCore/inspector/front-end/treeoutline.js | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/WebCore/inspector/front-end/treeoutline.js b/WebCore/inspector/front-end/treeoutline.js index b6e35bb..799d8af 100644 --- a/WebCore/inspector/front-end/treeoutline.js +++ b/WebCore/inspector/front-end/treeoutline.js @@ -287,7 +287,7 @@ TreeOutline.prototype.findTreeElement = function(representedObject, isAncestor, if (cachedElement) return cachedElement; - // The representedObject isn't know, so we start at the top of the tree and work down to find the first + // The representedObject isn't known, so we start at the top of the tree and work down to find the first // tree element that represents representedObject or one of its ancestors. var item; var found = false; @@ -567,7 +567,7 @@ TreeElement.prototype._attach = function() if (this.selected) this._listItemNode.addStyleClass("selected"); - this._listItemNode.addEventListener("mousedown", TreeElement.treeElementSelected, false); + this._listItemNode.addEventListener("mousedown", TreeElement.treeElementMouseDown, false); this._listItemNode.addEventListener("click", TreeElement.treeElementToggled, false); this._listItemNode.addEventListener("dblclick", TreeElement.treeElementDoubleClicked, false); @@ -595,7 +595,7 @@ TreeElement.prototype._detach = function() this._childrenListNode.parentNode.removeChild(this._childrenListNode); } -TreeElement.treeElementSelected = function(event) +TreeElement.treeElementMouseDown = function(event) { var element = event.currentTarget; if (!element || !element.treeElement || !element.treeElement.selectable) @@ -604,7 +604,7 @@ TreeElement.treeElementSelected = function(event) if (element.treeElement.isEventWithinDisclosureTriangle(event)) return; - element.treeElement.select(); + element.treeElement.selectOnMouseDown(event); } TreeElement.treeElementToggled = function(event) @@ -767,6 +767,11 @@ TreeElement.prototype.revealed = function() return true; } +TreeElement.prototype.selectOnMouseDown = function(event) +{ + this.select(); +} + TreeElement.prototype.select = function(supressOnSelect) { if (!this.treeOutline || !this.selectable || this.selected) |