left_sidebar: Fix click handler selector for all private messages.

The previous logic did not correctly handle clicks that were in the
tiny spaces inside the link tag but outside the icon element.

Fixes #25647.
This commit is contained in:
Aman Agrawal
2023-10-03 05:04:57 +00:00
committed by Tim Abbott
parent eb81a4f21f
commit 2d4d4b86eb

View File

@@ -719,7 +719,7 @@ export function initialize() {
"click",
".private_messages_container.zoom-out #private_messages_section_header",
(e) => {
if (e.target.classList.value === "fa fa-align-right") {
if ($(e.target).closest("#show_all_private_messages").length === 1) {
// Let the browser handle the "all direct messages" widget.
return;
}