Prevent selecting a word in the breadcrumb or the styles section when double
clicking on a DOM node in the outline tree.
* page/inspector/DocumentPanel.js: Call preventDefault() when a mousedown event
with a detail of 2 or higher comes in. This prevents the selection.
* page/inspector/inspector.css: Mark the breadcrumb as user-select: none.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@27735
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2007-11-12 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ Prevent selecting a word in the breadcrumb or the styles section when double
+ clicking on a DOM node in the outline tree.
+
+ * page/inspector/DocumentPanel.js: Call preventDefault() when a mousedown event
+ with a detail of 2 or higher comes in. This prevents the selection.
+ * page/inspector/inspector.css: Mark the breadcrumb as user-select: none.
+
2007-11-12 Oliver Hunt <oliver@apple.com>
Reviewed by Darin and Antti.
this.selectionElement.style.height = listItemElement.offsetHeight + "px";
},
+ onattach: function()
+ {
+ var element = this;
+ this.listItemElement.addEventListener("mousedown", function(event) { element.onmousedown(event) }, false);
+ },
+
onpopulate: function()
{
if (this.children.length || this.whitespaceIgnored !== Preferences.ignoreWhitespace)
setTimeout(function() { element.updateSelection() }, 0);
},
+ onmousedown: function(event)
+ {
+ // Prevent selecting the nearest word on double click.
+ if (event.detail >= 2)
+ event.preventDefault();
+ },
+
ondblclick: function()
{
var panel = this.treeOutline.panel;
}
.crumbs {
+ -webkit-user-select: none;
-webkit-box-sizing: border-box;
position: absolute;
left: 0;