From 9857021d2c4c61cf52d1d98301cbae374b8c565e Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Tue, 24 Apr 2018 11:15:20 +0200 Subject: [PATCH] Revert "loader.js: place focus at the end of text inputs" This reverts commit d1fd7e4be78f3dda9734027dda53114b71a7a46d. Browsers seem to do this on their own natively. Way better. refs #3348 --- public/js/icinga/loader.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/public/js/icinga/loader.js b/public/js/icinga/loader.js index 43f69d238..d17465e09 100644 --- a/public/js/icinga/loader.js +++ b/public/js/icinga/loader.js @@ -857,15 +857,6 @@ if ($activeElement.length && $activeElement.is(':visible')) { $activeElement.focus(); - if ($activeElement.is('input[type=text]')) { - if (typeof $activeElement[0].setSelectionRange === 'function') { - // Place focus after the last character. Could be extended to other - // input types, would require some \r\n "magic" to work around issues - // with some browsers - var len = $activeElement.val().length; - $activeElement[0].setSelectionRange(len, len); - } - } } else if (! autorefresh) { if (focusFallback) { $(focusFallback.parent).find(focusFallback.child).focus();