lexxy 0.9.26 → 0.9.27
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.
- checksums.yaml +4 -4
- data/app/assets/javascript/lexxy.js +25 -1
- data/app/assets/javascript/lexxy.js.br +0 -0
- data/app/assets/javascript/lexxy.js.gz +0 -0
- data/app/assets/javascript/lexxy.js.map +1 -1
- data/app/assets/javascript/lexxy.min.js +1 -1
- data/app/assets/javascript/lexxy.min.js.br +0 -0
- data/app/assets/javascript/lexxy.min.js.gz +0 -0
- data/lib/lexxy/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1ef504d8ff6c3ee45519815bb36ea8c2d21316f8032c87967602138c88f4457b
|
|
4
|
+
data.tar.gz: 95e79bbbccdffe031d6938acce662d7d466fc248c63b609d0b6a058e9f586da1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d600ab9f59fa036b56143d081ecadecde64c24f674639d64067add0bebb276ab4da142c0022802e6cfe5c656902f866ae4fecc80a37ba63e8385d567e3517caa
|
|
7
|
+
data.tar.gz: a0eb4b38a69a6f436a611f5023e078bfff26b37152603f2f3d923256c1e57672845c0bed337cec6c38989582e400be3a24ff7d9e803782d0c56dc94bb5f7995f
|
|
@@ -11085,10 +11085,34 @@ class Selection {
|
|
|
11085
11085
|
|
|
11086
11086
|
this.editor.registerCommand(ie$4, () => {
|
|
11087
11087
|
this.#syncSelectedClasses();
|
|
11088
|
-
}, io)
|
|
11088
|
+
}, io),
|
|
11089
|
+
|
|
11090
|
+
this.editor.registerCommand(ie$4, () => {
|
|
11091
|
+
this.#preserveFocusOfOtherFields();
|
|
11092
|
+
return false
|
|
11093
|
+
}, lo)
|
|
11089
11094
|
);
|
|
11090
11095
|
}
|
|
11091
11096
|
|
|
11097
|
+
// Firefox (152+) keeps window.getSelection() anchored inside the editor after focus
|
|
11098
|
+
// moves to another field, and fires document selectionchange for every keystroke
|
|
11099
|
+
// typed there. Lexical reads that stale selection, reconciles, and pulls focus back
|
|
11100
|
+
// into the editor — stealing it mid-typing. When another text-entry field owns focus,
|
|
11101
|
+
// tag the update so Lexical leaves the DOM selection (and with it, focus) alone.
|
|
11102
|
+
#preserveFocusOfOtherFields() {
|
|
11103
|
+
if (this.#anotherFieldIsFocused) {
|
|
11104
|
+
Os(qn);
|
|
11105
|
+
}
|
|
11106
|
+
}
|
|
11107
|
+
|
|
11108
|
+
get #anotherFieldIsFocused() {
|
|
11109
|
+
const rootElement = this.editor.getRootElement();
|
|
11110
|
+
const activeElement = rootElement?.ownerDocument.activeElement;
|
|
11111
|
+
|
|
11112
|
+
return activeElement && !rootElement.contains(activeElement) &&
|
|
11113
|
+
(activeElement.tagName === "INPUT" || activeElement.tagName === "TEXTAREA" || activeElement.isContentEditable)
|
|
11114
|
+
}
|
|
11115
|
+
|
|
11092
11116
|
#listenForNodeSelections() {
|
|
11093
11117
|
this.#listeners.track(this.editor.registerCommand(se$5, ({ target }) => {
|
|
11094
11118
|
if (!qs(target)) return false
|
|
Binary file
|
|
Binary file
|