diff --git a/css/searchbar.less b/css/searchbar.less index 4b5db2e..6718e22 100644 --- a/css/searchbar.less +++ b/css/searchbar.less @@ -43,6 +43,10 @@ background-color: @background; color: @foreground; font-size: 12px; + + &::selection { + background: mix(@accent, #ccc, 15%); + } } button { diff --git a/js/ui/searchbar.js b/js/ui/searchbar.js index f0323fa..5ae38bd 100644 --- a/js/ui/searchbar.js +++ b/js/ui/searchbar.js @@ -139,7 +139,7 @@ define([ var options = this.currentSearch; chrome.fileSystem.getDisplayPath(nodeEntry, function(path) { - if (!options.running) return c(); + if (!options.running) return c(); var file = new File(nodeEntry); var path = nodeEntry.fullPath; @@ -233,13 +233,14 @@ define([ }, activate: function(mode) { - var highlighted = editor.getSelectedText(); - if (highlighted) { - this.input.value = highlighted; + var selected = editor.getSelectedText(); + if (selected) { + this.input.value = selected; } this.element.addClass("active"); this.input.focus(); + this.input.select(); }, deactivate: function(cancel) {