Switch to Search component in tag selector and support X/Esc to clear

This moves debouncing into the search component and adds cancel behavior
from the XUL search textbox. For now, this uses the X button from
Firefox.
This commit is contained in:
Dan Stillman 2019-03-20 04:42:53 -04:00
parent 14d25d273a
commit 42667e7090
6 changed files with 138 additions and 21 deletions

View file

@ -0,0 +1,21 @@
.search {
position: relative;
}
.search input {
-moz-appearance: searchfield;
flex: 1 0;
min-width: 40px;
height: 24px;
padding-left: 4px;
}
.search .search-cancel-button {
background-image: url(chrome://global/skin/icons/searchfield-cancel.svg);
position: absolute;
width: 14px;
height: 14px;
top: 6px;
right: 6px;
cursor: default;
}

View file

@ -24,6 +24,13 @@
height: 100%;
}
.tag-selector-list {
list-style: none;
display: inline-block;
margin: 0;
padding: 0;
}
.tag-selector-filter-container {
height: auto;
flex: 0 0 1em;
@ -32,16 +39,9 @@
padding: 0.125em 0 0.125em 0.5em;
}
.tag-selector-list {
list-style: none;
display: inline-block;
margin: 0;
padding: 0;
}
.tag-selector-filter {
.tag-selector-filter-container .search {
display: flex;
flex: 1 0;
min-width: 40px;
}
.tag-selector-actions {