Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

ui_util: Fix incorrectly converted focus method call.

Anders Kaseorg11bde22cb3d3
diff --git a/static/js/ui_util.js b/static/js/ui_util.js
index bda79d0be36..e063b6ea50d 100644
--- a/static/js/ui_util.js
+++ b/static/js/ui_util.js
@@ -7,7 +7,7 @@ exports.change_tab_to = function (tabname) {
// https://stackoverflow.com/questions/4233265/contenteditable-set-caret-at-the-end-of-the-text-cross-browser
exports.place_caret_at_end = function (el) {
- el.trigger("focus");
+ el.focus();
if (typeof window.getSelection !== "undefined" && typeof document.createRange !== "undefined") {
const range = document.createRange();