Skip to content

Commit 261ff04

Browse files
Removed hijack of return key on entire page
Only simulate the submit when the field is actually in focus.
1 parent 1ad204d commit 261ff04

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

js/jquery.storelocator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ $.fn.storeLocator = function(options) {
298298
get_form_values(e);
299299
});
300300
$(document).on('keyup.'+prefix, function(e){
301-
if (e.keyCode === 13) {
301+
if (e.keyCode === 13 && $('#' + settings.inputID).is(':focus')) {
302302
get_form_values(e);
303303
}
304304
});

0 commit comments

Comments
 (0)