@phuong-tran-redoc/document-engine-angular 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phuong-tran-redoc/document-engine-angular",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Realestatedoc (Redoc)",
@@ -35,7 +35,7 @@
35
35
  "dependencies": {
36
36
  "tslib": "^2.3.0",
37
37
  "@floating-ui/dom": "^1.7.4",
38
- "@phuong-tran-redoc/document-engine-core": "0.1.5"
38
+ "@phuong-tran-redoc/document-engine-core": "0.1.6"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "rxjs": "^7.5.0",
@@ -13,12 +13,17 @@
13
13
  // a flex item of :host, and a fixed-height container is left with a band of
14
14
  // dead, unclickable space under the editable.
15
15
  //
16
- // `max-height: 100%` is inert when the parent's height is indefinite (a
17
- // percentage against an auto height resolves to none), so an unconstrained
18
- // consumer still gets a box that simply grows.
16
+ // Deliberately NO `max-height` and no `overflow` anywhere in this subtree: the
17
+ // selection bubble menu is `position: absolute` inside `.tiptap-editor`, so any
18
+ // scroll container on an ancestor becomes its clip rect and silently eats the
19
+ // part of a panel that extends past the editing surface — a dropdown opening
20
+ // upward loses its top options to the clip and the clicks land on the toolbar
21
+ // behind it. Capping the height without a scroller is worse still (content
22
+ // paints straight through the bottom edge), so the box grows and the page
23
+ // scrolls. Giving a fixed-height container a real scroller requires the bubble
24
+ // to become `position: fixed` first — tracked separately.
19
25
  flex: 1 1 auto;
20
26
  min-height: 0;
21
- max-height: 100%;
22
27
 
23
28
  &__content {
24
29
  padding: 1rem;
@@ -26,8 +31,9 @@
26
31
  background-color: var(--card, #fff);
27
32
 
28
33
  // Take the leftover space so the editing surface below can stretch into it.
29
- // Deliberately no `overflow` here: the panels rendered inside carry selects
30
- // and colour popovers, and an overflow ancestor can clip them.
34
+ // Deliberately no `overflow` here — see the note on `.tiptap-editor` below:
35
+ // the selection bubble is an absolutely-positioned descendant, so a scroller
36
+ // anywhere on this path clips it.
31
37
  display: flex;
32
38
  flex-direction: column;
33
39
  flex: 1 1 auto;
@@ -63,15 +69,17 @@
63
69
  flex: 1 1 auto;
64
70
  min-height: 0;
65
71
 
66
- // The editing surface is the scroll container. Without this, `max-height: 100%`
67
- // above caps the wrapper while nothing scrolls, so a long document paints
68
- // straight through the bottom of a fixed-height container and over whatever
69
- // follows it on the page.
72
+ // No `overflow` here. This element is `position: relative`, which makes it the
73
+ // containing block for `.bubble-menu-wrapper` (`position: absolute`, z-index 30)
74
+ // — so a scroll container here clips the selection bubble to the editing
75
+ // surface. The visible symptom is a select dropdown that opens upward: its top
76
+ // options are clipped away and the clicks fall through to the sticky toolbar.
70
77
  //
71
- // Safe to put overflow here: the floating panels are rendered inside
72
- // `document-engine-toolbar`, a sibling of the content box, never a descendant
73
- // of this element — so there is nothing of theirs for this to clip.
74
- overflow-y: auto;
78
+ // Measured ancestry, for anyone tempted to add it back:
79
+ // button.document-engine-select-option
80
+ // → div.document-engine-select__dropdown [absolute z=1000]
81
+ // → div.bubble-menu-wrapper [absolute z=30]
82
+ // → tiptap-editor [relative] ← clip rect lives here
75
83
 
76
84
  > .tiptap,
77
85
  > .ProseMirror {