mirror of
https://github.com/zulip/zulip.git
synced 2025-11-09 16:37:23 +00:00
ui_util: Fix incorrectly converted focus method call.
Commit a9ca5f603b (#15863) incorrectly
converted this; el is a DOM element, not a jQuery element.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Anders Kaseorg
parent
79d20c7c21
commit
11bde22cb3
@@ -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
|
// https://stackoverflow.com/questions/4233265/contenteditable-set-caret-at-the-end-of-the-text-cross-browser
|
||||||
exports.place_caret_at_end = function (el) {
|
exports.place_caret_at_end = function (el) {
|
||||||
el.trigger("focus");
|
el.focus();
|
||||||
|
|
||||||
if (typeof window.getSelection !== "undefined" && typeof document.createRange !== "undefined") {
|
if (typeof window.getSelection !== "undefined" && typeof document.createRange !== "undefined") {
|
||||||
const range = document.createRange();
|
const range = document.createRange();
|
||||||
|
|||||||
Reference in New Issue
Block a user