From ff28fc88f74ef6fd126c9e2197c7bf4f7feb2931 Mon Sep 17 00:00:00 2001 From: Chris Hallberg <crhallberg@gmail.com> Date: Thu, 25 Feb 2016 15:23:28 -0500 Subject: [PATCH] Prevent autocomplete search on refresh. --- themes/bootstrap3/js/autocomplete.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/themes/bootstrap3/js/autocomplete.js b/themes/bootstrap3/js/autocomplete.js index 3641089258b..2bd5c7df2da 100644 --- a/themes/bootstrap3/js/autocomplete.js +++ b/themes/bootstrap3/js/autocomplete.js @@ -140,7 +140,7 @@ input.keyup(function(event) { // Ignore navigation keys // - Ignore control functions - if (event.ctrlKey) { + if (event.ctrlKey || event.which === 17) { return; } // - Function keys (F1 - F15) @@ -171,6 +171,10 @@ } }); input.keydown(function(event) { + // - Ignore control functions + if (event.ctrlKey || event.which === 17) { + return; + } var element = $.fn.autocomplete.element; var position = $(this).data('selected'); switch (event.which) { -- GitLab