fix: allow clicking action on entire "ListItem" area, instead of just the "text elements"

This commit is contained in:
Sergey Mosin 2023-07-13 19:22:04 -04:00
parent 49010a70a0
commit 15e59ef65f
2 changed files with 11 additions and 3 deletions

View file

@ -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) {

View file

@ -219,7 +219,7 @@ export class MailMessageList extends AbstractViewRight {
MessagelistUserStore,
MessagelistUserStore.selectedMessage,
MessagelistUserStore.focusedMessage,
'.messageListItem .actionHandle',
'.messageListItem',
'.messageListItem .messageCheckbox',
'.messageListItem.focused'
);