mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 23:13:25 +00:00
compose_state: Make get_or_set accept a full selector.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
daa34685c3
commit
d6be353299
@@ -5,7 +5,7 @@ import $ from "jquery";
|
||||
let saved_compose_cursor = 0;
|
||||
|
||||
function set_compose_textarea_handlers(): void {
|
||||
$("#compose-textarea").on("blur", function () {
|
||||
$("textarea#compose-textarea").on("blur", function () {
|
||||
saved_compose_cursor = $(this).caret();
|
||||
});
|
||||
|
||||
@@ -17,7 +17,7 @@ function set_compose_textarea_handlers(): void {
|
||||
}
|
||||
|
||||
export function restore_compose_cursor(): void {
|
||||
$("#compose-textarea").trigger("focus").caret(saved_compose_cursor);
|
||||
$("textarea#compose-textarea").trigger("focus").caret(saved_compose_cursor);
|
||||
}
|
||||
|
||||
export function initialize(): void {
|
||||
|
||||
Reference in New Issue
Block a user