headlessui icon indicating copy to clipboard operation
headlessui copied to clipboard

Transition no longer maintaining class specified in enterTo at end of transition.

Open tomelliot opened this issue 1 year ago • 1 comments

What package within Headless UI are you using? @headlessui/react

What version of that package are you using?

v1.7.18

What browser are you using?

Chrome Version 121.0.6167.160 (Official Build) (arm64)

Reproduction URL

repro

Describe your issue

A <Transition> that would previously fade out and stay at opacity-0 no longer stays at opacity-0 at the end of the transition. After fading out it pops back to full visibility (the opacity-0 class is removed).

        <Transition
          appear={true}
          show={true}
          enter="transition-opacity ease-in-out duration-1000"
          enterFrom="opacity-100"
          enterTo="opacity-0"
          aria-hidden="true"
        >
          <div>
            <CheckCircleIcon className={clsx("h-5 w-5 text-green-500")} />
          </div>
        </Transition>

tomelliot avatar Feb 16 '24 15:02 tomelliot

i have the same problem after upgrading to version 1.7.18

mrajaei76 avatar Feb 17 '24 05:02 mrajaei76

I've got the same problem using 2.0.0-alpha.4 which is required for Catalyst.

noynek avatar Mar 12 '24 18:03 noynek

This seems similar to this issue (?): #2914 According to my bisect it broke in v1.7.18 (which seems to echo others here)

areriklq avatar Mar 26 '24 07:03 areriklq

Hey!

This should be fixed by #3074, and will be available in the next release.

You can already try it using:

  • npm install @headlessui/react@insiders.

RobinMalfait avatar Apr 05 '24 14:04 RobinMalfait

Hi @RobinMalfait ,

Sorry for the late response, but I just now tried to update to 1.7.19 and it does not solve the transition regression that was introduced in 1.7.18 (but I don't see it mentioned in the release notes either so it might be expected?).

However, v2.0.2 does solve the issue I was seeing. ✅ Thanks!

areriklq avatar May 10 '24 13:05 areriklq