From 2248e4de165e5cb43ca7b518c813d39e83d399e6 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Fri, 15 Nov 2013 18:07:38 +0100 Subject: [PATCH] Fix the index search clear button appearance on Firefox. --- css/style.css | 3 +++ src/General/Index.coffee | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/css/style.css b/css/style.css index 56a6a5d31..0718196fd 100644 --- a/css/style.css +++ b/css/style.css @@ -383,7 +383,10 @@ a[href="javascript:;"] { color: gray; margin-left: -1.25em; } +<% if (type === 'crx') { %> +/* ``::-webkit-*'' selectors break selector lists on Firefox. */ #index-search::-webkit-search-cancel-button, +<% } %> #index-search:not([data-searching]) + #index-search-clear { display: none; } diff --git a/src/General/Index.coffee b/src/General/Index.coffee index 070671247..866067d0d 100644 --- a/src/General/Index.coffee +++ b/src/General/Index.coffee @@ -332,7 +332,12 @@ Index = if Index.isSearching = !!Index.searchInput.value.trim() Index.searchInput.dataset.searching = 1 else + <% if (type === 'userscript') { %> + # XXX https://github.com/greasemonkey/greasemonkey/issues/1571 + Index.searchInput.removeAttribute 'data-searching' + <% } else { %> delete Index.searchInput.dataset.searching + <% } %> Index.sort() Index.buildIndex() querySearch: (query) ->