diff --git a/css/80_app.css b/css/80_app.css index 6c02c614f..07ede5b77 100644 --- a/css/80_app.css +++ b/css/80_app.css @@ -597,6 +597,7 @@ button.add-note svg.icon { } .search-add .search-wrap:nth-last-child(2) { border-radius: 20px; + border: none; } .search-add input[type='search'] { position: relative; diff --git a/modules/ui/search_add.js b/modules/ui/search_add.js index a36124a5e..65b6a6c50 100644 --- a/modules/ui/search_add.js +++ b/modules/ui/search_add.js @@ -43,11 +43,20 @@ export function uiSearchAdd(context) { .attr('type', 'search') .call(utilNoAuto) .on('focus', function() { + search.attr('focusing', true); popover.classed('hide', false); }) .on('blur', function() { popover.classed('hide', true); }) + .on('click', function() { + if (search.attr('focusing')) { + search.attr('focusing', null); + search.node().setSelectionRange(0, search.property('value').length); + d3_event.preventDefault(); + d3_event.stopPropagation(); + } + }) .on('input', function () { var value = search.property('value'); //list.classed('filtered', value.length);