Repository navigation
fix: sd-tooltip staying invisible when reopened during its hide animation - #3384
SchulteDev wants to merge 2 commits into
Conversation
…tion A show that happened while a hide animation was still running ended with the tooltip open but hidden, because the hide always finished by hiding the popup. - a show/hide that got superseded no longer touches the popup and no longer emits its sd-after-* event - running animations are now stopped on the element that is actually animated - show() and hide() resolve once the latest transition has ended
🦋 Changeset detectedLatest commit: 5d7a9aa The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Hey @SchulteDev, thanks for taking the effort of creating this PR. We discussed this in our team and involved our design team here as well. While we see, that this implementation would be technically more "correct", we barely see a real-life risk. While we understand, that the current behaviour could irritate users, we believe this is a very edgy edge case. In addition we believe, that users (unfortunately) are used to use weird behaviour when things are clicked very very fast. One of our main principles is to stay maintainable as much as possible, and we currently see too much additional complexity in comparison to real life usage. As you mentioned, this would have to be adapted for the other components as well, leading to additional code there as well. Hoping for your understanding, that we're therefore closing this PR. Nevertheless, we're happy about your contribution and encourage you to continue with that! To avoid potential disappointment, it would be helpful to create a (short!) issue upfront, so that we can discuss it in the team first. |
|
@mariohamann |
Description:
Reopening
sd-tooltipwhile its hide animation was still running (~150 ms) left it open butinvisible:
open === true, butbody.hidden === trueandpopup.active === false.Reachable by clicking the trigger three times quickly, or tabbing onto it, away and back.
stopAnimations()targets the element that is actually animated (popup.popup).sd-after-show/sd-after-hide, so these eventsalways match the final state.
show()/hide()still resolve, once the latesttransition has ended.
Not part of this PR:
sd-dropdown,sd-dialogandsd-drawershow the same defect.Definition of Reviewable: