mirror of https://github.com/zulip/zulip.git
Focus on the correct textbox when you initiate a compose when narrowed.
The logic for this already existed, but start() was getting called twice, once from compose.set_mode and once from the click handler, and the result was the focus always being in the stream input box. (imported from commit 9a832a118856b5705524975a4412b7e6e547ef5c)
This commit is contained in:
parent
1ac44f0356
commit
c50e05bc68
|
@ -47,8 +47,7 @@ function show(tabname, focus_area) {
|
|||
viewport.user_initiated_animate_scroll(cover+5);
|
||||
}
|
||||
});
|
||||
focus_area.focus();
|
||||
focus_area.select();
|
||||
focus_area.focus().select();
|
||||
// Disable the notifications bar if it overlaps with the composebox
|
||||
notifications_bar.maybe_disable();
|
||||
}
|
||||
|
@ -556,9 +555,9 @@ $(function () {
|
|||
// If we click in the composebox, start up a new message
|
||||
if (!compose.composing()) {
|
||||
if (narrow.narrowed_to_pms()) {
|
||||
compose.set_mode('private');
|
||||
compose.start('private');
|
||||
} else {
|
||||
compose.set_mode('stream');
|
||||
compose.start('stream');
|
||||
}
|
||||
e.stopPropagation();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue