dsh-better-left-sidebar 0.1.2 → 0.1.3
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/README.en.md +1 -1
- package/README.md +1 -1
- package/lib/client.js +9 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/README.en.md
CHANGED
|
@@ -51,7 +51,7 @@ Restart DSH after installing.
|
|
|
51
51
|
You can also install the matching GitHub Release:
|
|
52
52
|
|
|
53
53
|
```sh
|
|
54
|
-
dsh plugin --profile web add github:exoticknight/dsh-better-left-sidebar#v0.1.
|
|
54
|
+
dsh plugin --profile web add github:exoticknight/dsh-better-left-sidebar#v0.1.3
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
Restart DSH after installing.
|
package/README.md
CHANGED
|
@@ -51,7 +51,7 @@ dsh plugin --profile web add dsh-better-left-sidebar
|
|
|
51
51
|
也可以安装对应版本的 GitHub Release:
|
|
52
52
|
|
|
53
53
|
```sh
|
|
54
|
-
dsh plugin --profile web add github:exoticknight/dsh-better-left-sidebar#v0.1.
|
|
54
|
+
dsh plugin --profile web add github:exoticknight/dsh-better-left-sidebar#v0.1.3
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
安装后重启 DSH。
|
package/lib/client.js
CHANGED
|
@@ -1622,6 +1622,7 @@ function connectInteraction() {
|
|
|
1622
1622
|
for (const popup of associatedPopups) if (popup.isConnected && popup.contains(target)) return true;
|
|
1623
1623
|
return false;
|
|
1624
1624
|
};
|
|
1625
|
+
const isKeyboardFocused = (target) => target instanceof HTMLElement && target.matches(":focus-visible");
|
|
1625
1626
|
const visiblePopups = () => [...document.querySelectorAll(POPUP_SELECTOR)].filter((popup) => {
|
|
1626
1627
|
const node = popup;
|
|
1627
1628
|
return !node.hidden && node.getAttribute("aria-hidden") !== "true" && node.getClientRects().length > 0;
|
|
@@ -1838,11 +1839,18 @@ function connectInteraction() {
|
|
|
1838
1839
|
else if (!pointerInside) requestClose();
|
|
1839
1840
|
};
|
|
1840
1841
|
const onFocusIn = (event) => {
|
|
1841
|
-
focusTarget = event.target;
|
|
1842
1842
|
if (isNavTarget(event.target) || isPopupTarget(event.target)) {
|
|
1843
|
+
if (!isKeyboardFocused(event.target)) {
|
|
1844
|
+
focusTarget = null;
|
|
1845
|
+
focusInside = false;
|
|
1846
|
+
requestClose();
|
|
1847
|
+
return;
|
|
1848
|
+
}
|
|
1849
|
+
focusTarget = event.target;
|
|
1843
1850
|
focusInside = true;
|
|
1844
1851
|
expandTemporarily();
|
|
1845
1852
|
} else {
|
|
1853
|
+
focusTarget = event.target;
|
|
1846
1854
|
focusInside = false;
|
|
1847
1855
|
requestClose();
|
|
1848
1856
|
}
|
package/lib/index.js
CHANGED
package/package.json
CHANGED