Commit deb67d7d authored by danno's avatar danno Committed by Commit bot

[turbolizer]: Fix bugs

* The default text (placeholder) in the search box is now present.
* All key events handled by turbolizer are not passed through to Chrome.

Review-Url: https://codereview.chromium.org/2061713002
Cr-Commit-Position: refs/heads/master@{#36936}
parent 6203906c
......@@ -571,6 +571,7 @@ class GraphView extends View {
}
var allowRepetition = true;
var eventHandled = true; // unless the below switch defaults
switch(d3.event.keyCode) {
case 49:
case 50:
......@@ -616,6 +617,12 @@ class GraphView extends View {
selectNodesThroughEdges(d3.event.keyCode == 38, undefined, true);
break;
}
default:
eventHandled = false;
break;
}
if (eventHandled) {
d3.event.preventDefault();
}
if (!allowRepetition) {
state.lastKeyDown = d3.event.keyCode;
......
......@@ -24,7 +24,8 @@
<input id="toggle-types" type="image" title="show/hide types"
src="types.png" alt="show/hide types" class="button-input">
<input id="search-input" type="text" title="search nodes for regex"
alt="search node for regex" class="search-input">
alt="search node for regex" class="search-input"
placeholder="find with regexp&hellip;">
<select id="display-selector"></select>
</span>
<div id="load-file">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment