@asamuzakjp/dom-selector 7.1.0 → 7.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/js/finder.js +7 -1
package/package.json
CHANGED
package/src/js/finder.js
CHANGED
|
@@ -1133,6 +1133,7 @@ export class Finder {
|
|
|
1133
1133
|
const { target, type } = this.#event ?? {};
|
|
1134
1134
|
if (
|
|
1135
1135
|
/^(?:click|mouse(?:down|over|up))$/.test(type) &&
|
|
1136
|
+
target?.nodeType === ELEMENT_NODE &&
|
|
1136
1137
|
node.contains(target)
|
|
1137
1138
|
) {
|
|
1138
1139
|
matched.add(node);
|
|
@@ -1141,7 +1142,12 @@ export class Finder {
|
|
|
1141
1142
|
}
|
|
1142
1143
|
case 'active': {
|
|
1143
1144
|
const { buttons, target, type } = this.#event ?? {};
|
|
1144
|
-
if (
|
|
1145
|
+
if (
|
|
1146
|
+
type === 'mousedown' &&
|
|
1147
|
+
buttons & 1 &&
|
|
1148
|
+
target?.nodeType === ELEMENT_NODE &&
|
|
1149
|
+
node.contains(target)
|
|
1150
|
+
) {
|
|
1145
1151
|
matched.add(node);
|
|
1146
1152
|
}
|
|
1147
1153
|
break;
|