mirror of https://github.com/zulip/zulip.git
Revert "click_handlers: Don't treat dropdown menuitem clicks the same as links."
This reverts commit 202c04988f
.
See https://github.com/zulip/zulip/pull/24133#issuecomment-1416921919.
This commit is contained in:
parent
9881760796
commit
0f155b597f
|
@ -983,13 +983,8 @@ export function initialize() {
|
|||
}
|
||||
|
||||
if (compose_state.composing()) {
|
||||
const $closest_links = $(e.target).closest("a");
|
||||
const nearby_link_exists = $closest_links.length > 0;
|
||||
// Links that are actually dropdown widget don't count.
|
||||
const inside_dropdown_widget =
|
||||
nearby_link_exists && $closest_links[0].role === "menuitem";
|
||||
if (
|
||||
(nearby_link_exists && !inside_dropdown_widget) ||
|
||||
$(e.target).closest("a").length > 0 ||
|
||||
$(e.target).closest(".copy_codeblock").length > 0
|
||||
) {
|
||||
// Refocus compose message text box if one clicks an external
|
||||
|
|
Loading…
Reference in New Issue