Comments (4)
Thanks!! Fix works perfectly :)
from svelte-ux.
Hey @neilmfrench, thanks for the kind words. I have not tried route based Dialog/Drawer like you are using, but definitely feels like a bug with the Backdrop ordering or rendering of Dialog/Drawer (they are portal’s to the bottom). Could also be SSR related. Could you create a small repo on Stackblitz or similar I could investigate the issue?
from svelte-ux.
Thanks @techniq, hopefully this is enough to see it in action: https://stackblitz.com/edit/github-kaggbw-ei6tie?file=src%2Froutes%2Fpage%2F%2Blayout.svelte
If you click through the UI using the navbar by going to Page -> Close button, you should see it working fine. If you go directly to the url .../page/subpage or even refresh with the Dialog open, you'll notice the shading of the drawer is off.
from svelte-ux.
Thanks @neilmfrench, that was exactly what I needed (I ended up pulling it locally as it was a little easier to see the URL and test).
So the issue is the order of Backdrop
being rendered differently on refresh (should be immediately before the related Drawer
/Dialog
) and caused by portal'ing these to the bottom of the DOM (body element) to guarantee there isn't inadvertent styles inherited.
Initial | Refresh |
---|---|
![]() |
![]() |
![]() |
![]() |
There are 2 solutions / workarounds. Simply moving the <slot>
below the <Drawer>
instead of within it will fix the issue.
<Drawer
bind:open={rightOpen}
placement="right"
class="w-[550px]"
on:outroend={close}
>
<h2>Some content</h2>
<div slot="actions">
<Button on:click={create}>Close</Button>
</div>
</Drawer>
<!-- move this -->
<slot />
or you can pass portal={false}
to either <Drawer>
or <Dialog>
so one is not portal'd to the bottom. Note, if you do this to the <Dialog>
the relative context for the absolutely positioned Dialog
will be the Drawer
, and thus change the display.
from svelte-ux.
Related Issues (20)
- Table sort icon does not appear when table column "value" is used "name" is different from "value"
- Cloudflare Pages integration
- Access AppLayout.showDrawer externally HOT 2
- Support `NodeNext` packages HOT 5
- Fix `npm create svelte-ux@latest` on Windows HOT 10
- Cannot use key events with Dialog HOT 1
- Theme Page breaks when changing a color on a Skeleton Theme HOT 3
- Some way to copy themes to clipboard with only the explicitly set variables. HOT 1
- Lucide Icon Support
- [Table] Add settingsClasses support
- In a Form, the SelectField Seems to return the Label, not the Value HOT 5
- Consider using Cloudflare proxy to keep Umami analytics from getting blocked HOT 1
- Svelte 5 support / migration
- a11y warnings HOT 1
- TextField with multiline doesn't get inputEl set HOT 1
- DatePicker: Month / Year Selection HOT 1
- DatePicker: strange bug when format is set
- DateField: user can manually to set value to a disabled date
- Vite Plugin Svelte: Many Warnings: Self Closing HTML tags, non-interactive elements should not be assigned mouse or keyboard event listeners). HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from svelte-ux.