diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-07-04 19:26:42 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-07-04 19:26:42 -0400 |
commit | 0a9ad08e9e98645b8d8d53a0d4f56558a2aa8a78 (patch) | |
tree | c86668b3c588247a4913e41a95b15ca3bbe1eec9 /assets/js/src | |
parent | 32ddfb3fba9e0726623addd48ccd7af69e3b44f0 (diff) |
Set cursor at the end of selection on focus for search input (compatible with Firefox)
Diffstat (limited to 'assets/js/src')
-rw-r--r-- | assets/js/src/base.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/assets/js/src/base.js b/assets/js/src/base.js index ab9e59a9..b2a78424 100644 --- a/assets/js/src/base.js +++ b/assets/js/src/base.js @@ -236,7 +236,9 @@ var Kanboard = (function() { // Place cursor at the end when focusing on the search box $(document).on("focus", "#form-search", function() { - $(this).val($(this).val()); + if ($("#form-search")[0].setSelectionRange) { + $('#form-search')[0].setSelectionRange($('#form-search').val().length, $('#form-search').val().length); + } }); // Filter helper for search |