@lavalogic/scoria 0.37.21 → 0.37.23

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.
@@ -335,7 +335,10 @@ dialog {
335
335
 
336
336
  .modal-main {
337
337
  display: flex;
338
+ flex-flow: column nowrap;
338
339
  flex-grow: 1;
340
+ overflow-y: auto;
341
+ min-height: 0;
339
342
  padding: 0.75rem;
340
343
  background-color: #f4f7f9;
341
344
  }
@@ -122,16 +122,24 @@
122
122
  class:multifocus-start={focusDetails.isMultiFocusStart}
123
123
  bind:this={cellRef}
124
124
  onmousedown={(e) => {
125
- // Stop the browser's default mousedown -> focus side effect
126
- // on the inner Action button. The default focus call
127
- // implicitly calls `scrollIntoView` against the button (which
128
- // sits inside a sticky right-pinned cell whose layout position
129
- // is at the far right end of the row), causing the table to
130
- // jump horizontally on every click of the ellipsis menu. We
131
- // still want focus / activation behaviour, so the click handler
132
- // on the Action proper handles the popup toggle and the outer
133
- // `.focusable` cell handler manages the focus state.
125
+ // Suppress the click-side effects that cause the table to
126
+ // jump horizontally on Action button clicks:
127
+ // 1. `preventDefault()` cancels the browser's default
128
+ // mousedown -> focus on the inner `<button>`, which
129
+ // otherwise calls `scrollIntoView` against the button's
130
+ // underlying position (far right of the row, since the
131
+ // Actions column is sticky-pinned right).
132
+ // 2. `stopPropagation()` keeps the event out of the outer
133
+ // `.focusable` cell handler, which would otherwise call
134
+ // `tableContext.startFocus(...)` and trigger Table.svelte's
135
+ // focusStart $effect -> another `scrollIntoView`. Even
136
+ // with the pinned-cell-skip in that effect, focus state
137
+ // changes feed back into other scroll-restore paths.
138
+ // The Action's own `onclick` fires regardless (click is dispatched
139
+ // on mouseup independent of mousedown handling), so the popup
140
+ // toggle still works.
134
141
  e.preventDefault();
142
+ e.stopPropagation();
135
143
  }}
136
144
  >
137
145
  <!-- TODO {isMultiFocusStart} -->
@@ -349,20 +349,18 @@
349
349
  --input-width: 4rem;
350
350
  --input-border: none;
351
351
  }
352
- .spread_row .records-per-page {
353
- --input-width: 4.5rem;
354
- padding: 0 0.5rem;
355
- gap: 0.375rem;
356
- }
357
- .spread_row .records-per-page.nopad {
352
+ .spread_row .block.nopad {
358
353
  padding: 0;
359
354
  --button-padding-horizontal: 1rem;
360
355
  --button-padding-vertical: 0.56rem;
361
356
  }
362
- .spread_row .records-per-page.nopad.page-arrow {
357
+ .spread_row .block.nopad.page-arrow {
363
358
  --button-padding-horizontal: 0.6rem;
364
359
  --button-padding-vertical: 0.42rem;
365
360
  }
361
+ .spread_row .block.records-per-page {
362
+ --input-width: 2.75rem;
363
+ }
366
364
  .spread_row span,
367
365
  .spread_row label {
368
366
  white-space: nowrap;
@@ -146,7 +146,16 @@ export function attachDropdownPortal(options) {
146
146
  }
147
147
  originalParent = dropdown.parentNode;
148
148
  originalNextSibling = dropdown.nextSibling;
149
- document.body.appendChild(dropdown);
149
+ // Append the dropdown to the nearest open native `<dialog>` ancestor
150
+ // when one exists, otherwise to `document.body`. A `<dialog>` opened
151
+ // via `showModal()` renders in the browser's top layer, which sits
152
+ // above every z-indexed element in the regular stacking context.
153
+ // Without this hop the dropdown's `z-index: 10000` was still painted
154
+ // behind the dialog backdrop and its content (the symptom that
155
+ // surfaced as "select options disappear behind the allocate modal").
156
+ const dialogHost = trigger.closest('dialog');
157
+ const portalTarget = dialogHost && dialogHost.open ? dialogHost : document.body;
158
+ portalTarget.appendChild(dropdown);
150
159
  // Tag the teleported dropdown so any "click outside the
151
160
  // panel" / "click outside the trigger" handler elsewhere in
152
161
  // the codebase can recognise the dropdown as a logical
@@ -633,8 +633,13 @@
633
633
 
634
634
  .modal-main {
635
635
  display: flex;
636
+ flex-flow: column nowrap;
636
637
  flex-grow: 1;
637
- // overflow-y: auto;
638
+ // `overflow-y: auto` is the default for the modal body so long
639
+ // content (form fields, lists, etc.) scrolls inside the modal
640
+ // rather than pushing the footer buttons out of the viewport.
641
+ overflow-y: auto;
642
+ min-height: 0;
638
643
  padding: sizing.$half-padding;
639
644
  background-color: colours.$ui-blue-1;
640
645
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lavalogic/scoria",
3
3
  "description": "Svelte components used for the FloWMS Web Frontend",
4
- "version": "0.37.21",
4
+ "version": "0.37.23",
5
5
  "publishConfig": {
6
6
  "access": "restricted"
7
7
  },