mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-01 02:03:22 +00:00
Select all text upon focus on map search input for Google Maps
On the map page, when we search a location and than want to search for another, we would have to delete letter by letter of the previous search text. Now, when we click on the search input to type another search text, the previous text will be all selected and we can remove everything with just hitting the backspace once
This commit is contained in:
@@ -3,7 +3,7 @@ angular.module('Darkswarm').directive 'mapSearch', ($timeout, Search) ->
|
||||
restrict: 'E'
|
||||
require: ['^uiGmapGoogleMap', 'ngModel']
|
||||
replace: true
|
||||
template: '<input id="pac-input" ng-model="query" placeholder="' + t('location_placeholder') + '"></input>'
|
||||
template: '<input id="pac-input" ng-model="query" placeholder="' + t('location_placeholder') + '" onfocus="this.select()"></input>'
|
||||
scope: {}
|
||||
|
||||
controller: ($scope) ->
|
||||
|
||||
Reference in New Issue
Block a user