dsh-deck-touch 0.1.5 → 0.1.6
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/lib/client.js +6 -3
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -19,7 +19,7 @@ window.__ModuleLoader__.load({id:`dsh-deck-touch`,factory:require=>{
|
|
|
19
19
|
const inject = [];
|
|
20
20
|
|
|
21
21
|
const CONTRACT_VERSION = '1';
|
|
22
|
-
const PLUGIN_VERSION = '0.1.
|
|
22
|
+
const PLUGIN_VERSION = '0.1.6';
|
|
23
23
|
|
|
24
24
|
// ---- probe:只读 DOM ----
|
|
25
25
|
|
|
@@ -39,7 +39,8 @@ window.__ModuleLoader__.load({id:`dsh-deck-touch`,factory:require=>{
|
|
|
39
39
|
let current = node;
|
|
40
40
|
while (current && current !== document.body) {
|
|
41
41
|
if (current.hasAttribute &&
|
|
42
|
-
(current.
|
|
42
|
+
(current.getAttribute('data-shortcut-modal') === 'sidebar' ||
|
|
43
|
+
current.hasAttribute('data-sidebar') || current.hasAttribute('data-sidebar-panel') ||
|
|
43
44
|
current.tagName === 'ASIDE')) return true;
|
|
44
45
|
current = current.parentElement;
|
|
45
46
|
}
|
|
@@ -103,7 +104,9 @@ window.__ModuleLoader__.load({id:`dsh-deck-touch`,factory:require=>{
|
|
|
103
104
|
const dialogs = document.querySelectorAll('[role="dialog"][aria-modal="true"], [role="alertdialog"]');
|
|
104
105
|
for (let i = dialogs.length - 1; i >= 0; i -= 1) {
|
|
105
106
|
const dialog = dialogs[i];
|
|
106
|
-
if (dialog !== settings && !dialog.contains(settings) && isVisible(dialog))
|
|
107
|
+
if (dialog !== settings && !dialog.contains(settings) && !insideSidebar(dialog) && isVisible(dialog)) {
|
|
108
|
+
return dialog;
|
|
109
|
+
}
|
|
107
110
|
}
|
|
108
111
|
return null;
|
|
109
112
|
}
|