auto-focus primary button in "delete route" dialog (#387)

After opening the "delete route" dialog the primary action button gets the
current focus. So it's possible to confirm resetting the route by pressing
"Enter".

bootbox had to be updated to to achieve this (in prior versions of bootbox the
needed callback didn't exist).

see #385
This commit is contained in:
Marcus Jaschen 2021-03-23 09:45:35 +01:00 committed by GitHub
parent f3d4b23726
commit ca53080e7a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 27 additions and 14 deletions

View file

@ -153,6 +153,9 @@
},
],
value: ['route'],
onShown: function () {
$('button.bootbox-accept', $(this)).focus();
},
callback: function (result) {
if (result !== null) {
if (result.indexOf('route') !== -1) {