Skip to content

Commit e49566e

Browse files
authored
Merge pull request #4068 from beatwiz/patch-2
Fix to allow enter key to select an option from address_google list of options without submitting the form.
2 parents c3a09d6 + 2a02e81 commit e49566e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/resources/views/crud/fields/address_google.blade.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,13 @@ function bpFieldInitAddressGoogleElement(element) {
130130
}
131131
}
132132
});
133+
134+
element.keydown(function(e) {
135+
if ($('.pac-container').is(':visible') && e.keyCode == 13) {
136+
e.preventDefault();
137+
return false;
138+
}
139+
});
133140
134141
// Make sure pac container is closed on modals (inline create)
135142
let modal = document.querySelector('.modal-dialog');

0 commit comments

Comments
 (0)