-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regression: No transitions on open dialog [v1.6.5] #1607
Comments
This is appears to be whenever there is a focussable (input/button) element within the dialog panel. The lack of transition used to occur on initial load of the component but now it appears to never transition when showing the panel. |
Seems to be working in Safari, but not in Firefox or Chrome anymore... if that helps. |
I'm seeing this too. Only when I have an input with autofocus turned on though. |
A workaround, for now, is to manually focus the input with no delay. Seems to work. useEffect(() => {
setTimeout(() => {
if (inputRef.current) {
inputRef.current.focus();
}
}, 0);
}, []); |
Must have been introduced in Problem appears on safari in my case, tool |
Yeah, also happens in Safari. https://headlessui.dev/vue/popover The react version works fine though. |
Can confirm that the issue is in Safari did not have the issue in my use cases. Chrome and Firefox had it - in a Vite/Vue setup, a Vite/Vue/Ts setup, and a Nuxt 3 setup. Downgrading to And for what it's worth in my use cases, there were no inputs or anything. I had a slide-over and a dialog from the headlessUI site both balking on the animate in on the two browsers. No inputs involved. Just an icon close button or the default buttons from the headless examps. |
I'm experiencing similar issues on react with v1.50, v1.6.4 and v1.6.5. Reproduction URL: https://codesandbox.io/embed/tailwind-css-and-react-forked-wsiu2h |
I'm experiencing the same problem. I had the v1.4.1 and decided to update to v.1.6.5 today and then I had this issue with the Transition component. I had to downgrade to v.1.50 in order to see this problem disappear. I'm going to skip v1.6+ for now. |
same here |
I have this same issue but with a variation that may provide clues as to the cause. Crucially, for me it (the "insta render/insta open bug) occurs ONLY IN SPECIFIC CIRCUMSTANCES in 1.6.4, but always in 1.6.5. However, because I was able to reproduce the insta-open behavior under a specific circumstance in 1.6.4, I thought this could be useful to report in terms of tracking down the cause. In the attached video, note that the slide-open transition appears properly when triggering (via a simple update of a
However, note that when it is triggered from an open menu (Button group, with dropdown: https://tailwindui.com/components/application-ui/elements/button-groups), it instantly renders without transition. 2022-07-01.16-02-17.mp4Given this, I am wondering if there is a (Headless UI internal) interaction between whatever's tracking the "open" state for both the Button group with dropdown, and the slideover? On the other hand, I was not able to reproduce the issue with a minimal example, even using 1.6.4: https://stackblitz.com/edit/github-gdgttl-kvccnl?file=src/App.vue My local project (as pictured in video; with hybrid behavior) versions: |
I'm experiencing the same issue with @headlessui/vue 1.6.5, the initial animations won't work. For now downgrading to the previous version (1.6.4) fix the problem. |
Same: @headlessui/vue 1.6.5. |
Confirm, too only enter position are not working with The example are not working either when choosing Vue (it works when you chose react) |
I've been thinking I've been going crazy (maybe I missed something) the last week, and just gave up... until I tried a new popover and still no transition. Both glad and frustrated it's not just me. Gonna try the downgrade. |
Seems to be related to focus-trap refactories since v1.5.0 - sadly Combobox "tab+focus" was broken in 1.5.0. So I had to find a workaround for any 1.6.x version, which is to pin to version 1.6.4 + handling This is all vue... btw. Setup modals, panels with new now transitions work, but focus-trap is messed up (tab cycles through all other focusable elements first until stepping into modal, from now on stays in the trap). A fix is to force Add event handler to TransitionRoot, ie.: <TransitionRoot as="template" :show="isOpen" @after-enter="onEntered"> And with (template): <button ref="CancelButtonRef" type="button">
Cancel
</button> plus (script setup): const okButtonRef = ref(null)
const onEntered = () => okButtonRef.value.focus() UX works out as expected. issues with 1.6.5 & 1.6.6
I'll try to setup stackblitz examples for both issue (1.6.6) and workaround (1.6.4). I'd liked to investigate and contribute, but TS + React are not my best friends... |
follow up: 1.6.6 with Transition- (& focus-) issue 1.6.4 working Transition but focus issue (with workaround) |
Hey! Thank you for your bug report! This should be fixed by #1664, and is available in the latest release 1.6.7. You can already try it using |
Thank you so much @RobinMalfait! I can confirm my use cases are working fine now with 1.6.7 Keep up the good work :) |
Looking forward to the react release! |
@RobinMalfait Awesome and thank you very much! Nice work on the tests, too! :) |
@RobinMalfait Thanks! will this be fixed on the React version? |
@LucasNovaes2016 Looks like the React version is being worked on right now #1118 |
It seems absolutely the same issue exists in |
@eugenet8k can you create a reproduction of this and share it? |
@RobinMalfait won't do an example, because the issue seems to be well described here #390 It was about having a button with Thank you for a quick response though. |
Hmm, when I use the CodeSandbox from #390 and bump to the latest version all the enter transitions seem to work just fine: https://codesandbox.io/s/headlessui-dialog-forked-beenfw?file=/pages/index.js 🤔 |
What package within Headless UI are you using?
@headlessui/vue
What version of that package are you using?
1.6.5
What browser are you using?
Chrome
Reproduction URL
https://headlessui.dev/vue/dialog
Describe your issue
No transitions take place when dialog initially appears or after closing/opening it again. Transition on close seems to work though. It used to work in v1.6.4.
The text was updated successfully, but these errors were encountered: