diff --git a/static/js/click_handlers.js b/static/js/click_handlers.js index d65dc47a21..cb218e7d53 100644 --- a/static/js/click_handlers.js +++ b/static/js/click_handlers.js @@ -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