diff --git a/js/glowingbear.js b/js/glowingbear.js index a995baa..d7e6500 100644 --- a/js/glowingbear.js +++ b/js/glowingbear.js @@ -1428,8 +1428,10 @@ weechat.directive('inputBar', function() { $scope.command = nickComp.text; // update current caret position - inputNode.focus(); - inputNode.setSelectionRange(nickComp.caretPos, nickComp.caretPos); + setTimeout(function() { + inputNode.focus(); + inputNode.setSelectionRange(nickComp.caretPos, nickComp.caretPos); + }, 0); };