smartrte-react 1.0.0-beta.13 → 1.0.0-beta.14
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.0-beta.14
|
|
4
|
+
|
|
5
|
+
- Fix toolbar dropdowns still landing far from their trigger inside a dialog centered via the standalone CSS `translate` property (e.g. Tailwind's `translate-x-[-50%] translate-y-[-50%]` compiled to `translate` rather than the legacy `transform` property, depending on Tailwind/browser version) — `findFixedPositioningContainer` only checked `transform`, missing that `translate`/`rotate`/`scale` (CSS Transforms Level 2's independent transform properties) each independently establish a `position: fixed` containing block too. Root-caused via a live console diagnostic against the real page rather than guessing. See `docs/bugs/toolbar-overlay-misplaced-standalone-translate-property.md`.
|
|
6
|
+
|
|
3
7
|
## 1.0.0-beta.13
|
|
4
8
|
|
|
5
9
|
- Fix toolbar dropdowns still landing far from their trigger inside a dialog whose ancestor uses `contain: layout` without `paint` — `1.0.0-beta.11`'s `contain` fix only checked for `paint`/`strict`/`content`, missing that bare `layout` alone also establishes a `position: fixed` containing block per spec (confirmed directly in real Chromium). Menus rendered hundreds of pixels from their trigger, overlapping unrelated page content, with no error. See `docs/bugs/toolbar-overlay-misplaced-inside-contain-layout-ancestor.md`.
|
|
@@ -9,6 +9,23 @@
|
|
|
9
9
|
* (`translate-x-[-50%] translate-y-[-50%]`), confirmed live via a Sootr
|
|
10
10
|
* host rendering the editor inside such a dialog
|
|
11
11
|
* (docs/bugs/toolbar-menu-misplaced-inside-transformed-ancestor.md).
|
|
12
|
+
* - `translate`, `rotate`, `scale` (CSS Transforms Level 2's *independent*
|
|
13
|
+
* transform properties, distinct from the legacy composite `transform`
|
|
14
|
+
* property) - a FOURTH real Sootr dialog kept misplacing every dropdown
|
|
15
|
+
* after all three fixes above shipped, still using the exact same
|
|
16
|
+
* `translate-x-[-50%] translate-y-[-50%]` Tailwind centering classes the
|
|
17
|
+
* very first fix (above) was written for - but a current Tailwind/browser
|
|
18
|
+
* combination compiles those classes to the standalone `translate: -50%
|
|
19
|
+
* -50%` CSS property, not `transform: translate(-50%, -50%)`. Confirmed
|
|
20
|
+
* directly in real Chromium: an ancestor with only `translate` set (its
|
|
21
|
+
* own computed `transform` reads `none`) still fully establishes a
|
|
22
|
+
* `position: fixed` containing block, per the CSS Transforms Level 2
|
|
23
|
+
* spec - the original fix's own doc comment described the right *symptom*
|
|
24
|
+
* (a Radix/shadcn Dialog's centering translate) but checked the wrong
|
|
25
|
+
* *property* for it, because at the time it was written the transform
|
|
26
|
+
* ended up composited into `transform` rather than emitted as `translate`
|
|
27
|
+
* directly. Both are checked now, since either can appear depending on
|
|
28
|
+
* the host's exact Tailwind/browser version.
|
|
12
29
|
* - `contain: layout | paint | strict | content` (CSS Containment) - a
|
|
13
30
|
* common perf/isolation optimization on large scrollable containers, e.g.
|
|
14
31
|
* a second, different Sootr dialog reported still misplacing every
|
|
@@ -69,8 +86,9 @@ export declare function getFixedPositioningOrigin(el: HTMLElement): {
|
|
|
69
86
|
* the actual, much narrower, clipping ancestor.
|
|
70
87
|
*
|
|
71
88
|
* Deliberately NOT applied for a containing block established only by
|
|
72
|
-
* `transform`/`perspective`/`filter
|
|
73
|
-
* `contain: layout` with no
|
|
89
|
+
* `transform`/`translate`/`rotate`/`scale`/`perspective`/`filter`/
|
|
90
|
+
* `backdrop-filter`/`will-change`, or by `contain: layout` with no
|
|
91
|
+
* `paint`/`strict`/`content` alongside it - none
|
|
74
92
|
* of those clip overflow (`layout` containment only isolates layout
|
|
75
93
|
* calculations, it does not imply paint containment - see the spec note
|
|
76
94
|
* above `findFixedPositioningContainer`), so a menu is free to visually
|
|
@@ -9,6 +9,23 @@
|
|
|
9
9
|
* (`translate-x-[-50%] translate-y-[-50%]`), confirmed live via a Sootr
|
|
10
10
|
* host rendering the editor inside such a dialog
|
|
11
11
|
* (docs/bugs/toolbar-menu-misplaced-inside-transformed-ancestor.md).
|
|
12
|
+
* - `translate`, `rotate`, `scale` (CSS Transforms Level 2's *independent*
|
|
13
|
+
* transform properties, distinct from the legacy composite `transform`
|
|
14
|
+
* property) - a FOURTH real Sootr dialog kept misplacing every dropdown
|
|
15
|
+
* after all three fixes above shipped, still using the exact same
|
|
16
|
+
* `translate-x-[-50%] translate-y-[-50%]` Tailwind centering classes the
|
|
17
|
+
* very first fix (above) was written for - but a current Tailwind/browser
|
|
18
|
+
* combination compiles those classes to the standalone `translate: -50%
|
|
19
|
+
* -50%` CSS property, not `transform: translate(-50%, -50%)`. Confirmed
|
|
20
|
+
* directly in real Chromium: an ancestor with only `translate` set (its
|
|
21
|
+
* own computed `transform` reads `none`) still fully establishes a
|
|
22
|
+
* `position: fixed` containing block, per the CSS Transforms Level 2
|
|
23
|
+
* spec - the original fix's own doc comment described the right *symptom*
|
|
24
|
+
* (a Radix/shadcn Dialog's centering translate) but checked the wrong
|
|
25
|
+
* *property* for it, because at the time it was written the transform
|
|
26
|
+
* ended up composited into `transform` rather than emitted as `translate`
|
|
27
|
+
* directly. Both are checked now, since either can appear depending on
|
|
28
|
+
* the host's exact Tailwind/browser version.
|
|
12
29
|
* - `contain: layout | paint | strict | content` (CSS Containment) - a
|
|
13
30
|
* common perf/isolation optimization on large scrollable containers, e.g.
|
|
14
31
|
* a second, different Sootr dialog reported still misplacing every
|
|
@@ -52,10 +69,13 @@ export function findFixedPositioningContainer(el) {
|
|
|
52
69
|
while (node) {
|
|
53
70
|
const style = window.getComputedStyle(node);
|
|
54
71
|
if ((style.transform && style.transform !== "none") ||
|
|
72
|
+
(style.translate && style.translate !== "none") ||
|
|
73
|
+
(style.rotate && style.rotate !== "none") ||
|
|
74
|
+
(style.scale && style.scale !== "none") ||
|
|
55
75
|
(style.perspective && style.perspective !== "none") ||
|
|
56
76
|
(style.filter && style.filter !== "none") ||
|
|
57
77
|
(style.backdropFilter && style.backdropFilter !== "none") ||
|
|
58
|
-
(style.willChange && /transform|perspective|filter/.test(style.willChange)) ||
|
|
78
|
+
(style.willChange && /transform|perspective|filter|translate|rotate|scale/.test(style.willChange)) ||
|
|
59
79
|
(style.contain && /\b(layout|paint|strict|content)\b/.test(style.contain))) {
|
|
60
80
|
return node;
|
|
61
81
|
}
|
|
@@ -87,8 +107,9 @@ export function getFixedPositioningOrigin(el) {
|
|
|
87
107
|
* the actual, much narrower, clipping ancestor.
|
|
88
108
|
*
|
|
89
109
|
* Deliberately NOT applied for a containing block established only by
|
|
90
|
-
* `transform`/`perspective`/`filter
|
|
91
|
-
* `contain: layout` with no
|
|
110
|
+
* `transform`/`translate`/`rotate`/`scale`/`perspective`/`filter`/
|
|
111
|
+
* `backdrop-filter`/`will-change`, or by `contain: layout` with no
|
|
112
|
+
* `paint`/`strict`/`content` alongside it - none
|
|
92
113
|
* of those clip overflow (`layout` containment only isolates layout
|
|
93
114
|
* calculations, it does not imply paint containment - see the spec note
|
|
94
115
|
* above `findFixedPositioningContainer`), so a menu is free to visually
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "smartrte-react",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.14",
|
|
4
4
|
"description": "A powerful, feature-rich Rich Text Editor for React with support for tables, mathematical formulas (LaTeX/KaTeX), and media management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|