From 15e59ef65fd2bf98ccf476b25d06cff0f3d0ad58 Mon Sep 17 00:00:00 2001 From: Sergey Mosin Date: Thu, 13 Jul 2023 19:22:04 -0400 Subject: [PATCH] fix: allow clicking action on entire "ListItem" area, instead of just the "text elements" --- dev/Common/Selector.js | 12 ++++++++++-- dev/View/User/MailBox/MessageList.js | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/dev/Common/Selector.js b/dev/Common/Selector.js index 88c044daf..bb7cfed70 100644 --- a/dev/Common/Selector.js +++ b/dev/Common/Selector.js @@ -200,8 +200,16 @@ export class Selector { addEventsListeners(contentScrollable, { click: event => { - let el = event.target.closestWithin(this.sItemSelector, contentScrollable); - el && this.actionClick(ko.dataFor(el), event); + + const lowerClassName = event.target.className.toLowerCase(); + if (this.sItemSelector !== '.messageListItem' + || (lowerClassName.indexOf('flagparent') === -1 + && lowerClassName.indexOf('checkbox') === -1)) { + + let el = event.target.closestWithin(this.sItemSelector, contentScrollable); + el && this.actionClick(ko.dataFor(el), event); + + } const item = getItem(this.sItemCheckedSelector); if (item) { diff --git a/dev/View/User/MailBox/MessageList.js b/dev/View/User/MailBox/MessageList.js index cf409f3b7..ef91c15ea 100644 --- a/dev/View/User/MailBox/MessageList.js +++ b/dev/View/User/MailBox/MessageList.js @@ -219,7 +219,7 @@ export class MailMessageList extends AbstractViewRight { MessagelistUserStore, MessagelistUserStore.selectedMessage, MessagelistUserStore.focusedMessage, - '.messageListItem .actionHandle', + '.messageListItem', '.messageListItem .messageCheckbox', '.messageListItem.focused' );