mirror of https://github.com/zulip/zulip.git
Do not send the browser back on backspace when send button focused
Fixes Trac #585 (imported from commit 2b5a02db66cc09ae41da7e6921a31a14c49cf811)
This commit is contained in:
parent
e5ab18276e
commit
78506acd20
|
@ -29,6 +29,13 @@ function process_hotkey(e) {
|
|||
if (ui.home_tab_obscured())
|
||||
return false;
|
||||
|
||||
// In browsers where backspace sends the browser back (e.g. Mac Chrome),
|
||||
// do not go back if the send button is in focus
|
||||
if ($('#compose-send-button:focus').length > 0 && code === 8) {
|
||||
e.preventDefault();
|
||||
return false;
|
||||
}
|
||||
|
||||
// Process hotkeys specially when in an input, textarea, or send button
|
||||
if ($('input:focus,textarea:focus,#compose-send-button:focus').length > 0) {
|
||||
if (code === 27) {
|
||||
|
|
Loading…
Reference in New Issue