Skip to content

Commit 259bac8

Browse files
committed
Select Geocoder text on focus. Fixes #4268.
1 parent f6a866a commit 259bac8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Source/Widgets/Geocoder/Geocoder.js

+5
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ value: searchText,\
7070
valueUpdate: "afterkeydown",\
7171
disable: isSearchInProgress,\
7272
css: { "cesium-geocoder-input-wide" : keepExpanded || searchText.length > 0 }');
73+
textBox.addEventListener('focus', function() {
74+
setTimeout(function() {
75+
textBox.select();
76+
}, 0);
77+
});
7378
form.appendChild(textBox);
7479

7580
var searchButton = document.createElement('span');

0 commit comments

Comments
 (0)