mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-01-02 21:12:02 +08:00
fix: allow clicking action on entire "ListItem" area, instead of just the "text elements"
This commit is contained in:
parent
49010a70a0
commit
15e59ef65f
2 changed files with 11 additions and 3 deletions
|
@ -200,8 +200,16 @@ export class Selector {
|
||||||
|
|
||||||
addEventsListeners(contentScrollable, {
|
addEventsListeners(contentScrollable, {
|
||||||
click: event => {
|
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);
|
const item = getItem(this.sItemCheckedSelector);
|
||||||
if (item) {
|
if (item) {
|
||||||
|
|
|
@ -219,7 +219,7 @@ export class MailMessageList extends AbstractViewRight {
|
||||||
MessagelistUserStore,
|
MessagelistUserStore,
|
||||||
MessagelistUserStore.selectedMessage,
|
MessagelistUserStore.selectedMessage,
|
||||||
MessagelistUserStore.focusedMessage,
|
MessagelistUserStore.focusedMessage,
|
||||||
'.messageListItem .actionHandle',
|
'.messageListItem',
|
||||||
'.messageListItem .messageCheckbox',
|
'.messageListItem .messageCheckbox',
|
||||||
'.messageListItem.focused'
|
'.messageListItem.focused'
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue