mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
left-sidebar: Fix opening of compose box on narrowing using hotkeys.
Explaining the problem a bit: When we narrow to a stream/private message using `q+Enter`/`w+Enter` compose box opens which isn't desirable here. The bug here was the propagation of event after getting handled in `keydown_util.handle` to `hotkeys.process_enter_key`. Fixes: #9679.
This commit is contained in:
@@ -5,8 +5,8 @@ zrequire('components');
|
||||
|
||||
var noop = function () {};
|
||||
|
||||
var LEFT_KEY = { which: 37, preventDefault: noop };
|
||||
var RIGHT_KEY = { which: 39, preventDefault: noop };
|
||||
var LEFT_KEY = { which: 37, preventDefault: noop, stopPropagation:noop };
|
||||
var RIGHT_KEY = { which: 39, preventDefault: noop, stopPropagation:noop };
|
||||
|
||||
run_test('basics', () => {
|
||||
var keydown_f;
|
||||
|
||||
@@ -32,6 +32,7 @@ exports.handle = function (opts) {
|
||||
|
||||
if (handled) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user