Skip to content
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

Animation broken on first open modal with dropdown multiple #542

Closed
dutrieux opened this issue Mar 7, 2019 · 8 comments
Closed

Animation broken on first open modal with dropdown multiple #542

dutrieux opened this issue Mar 7, 2019 · 8 comments
Labels
lang/javascript Anything involving JavaScript type/bug Any issue which is a bug or PR which fixes a bug
Milestone

Comments

@dutrieux
Copy link
Contributor

dutrieux commented Mar 7, 2019

Bug Report

Steps to reproduce

  1. click on the first button
  2. the modal open but without the animation "horizontal flip"
  3. if a close and reopen the modal, the animation of modal is ok

Expected result

open modal with animation

Actual result

on first open modal, the animation is broken (no effect)

Testcase

https://jsfiddle.net/dutrieux/ajwfetgh/35/

Screenshot (when possible)


modal

Version

2.7.2

@lubber-de lubber-de added the type/bug Any issue which is a bug or PR which fixes a bug label Mar 7, 2019
@lubber-de
Copy link
Member

lubber-de commented Mar 7, 2019

Nice catch.
You can get around this by either

  • Add queue: true to the modal setup
  • Move the dropdown initialization outside of the click event

See https://jsfiddle.net/zbvyqr2m/

@lubber-de lubber-de added type/usage Any support issues asking for help state/wont-fix Anything which isn't going to be fixed and removed type/bug Any issue which is a bug or PR which fixes a bug labels Mar 7, 2019
@lubber-de
Copy link
Member

Sorry, i was wrong.... forget about my last comment and the fiddle, the queuing does not seem to help/work (i take a look)
Currently it only helps to move initialization of the dropdown outside of the click event

@lubber-de lubber-de added type/bug Any issue which is a bug or PR which fixes a bug and removed type/usage Any support issues asking for help state/wont-fix Anything which isn't going to be fixed labels Mar 7, 2019
@dutrieux
Copy link
Contributor Author

Do you think you can fix this problem before the next release?

Thx for your help

@lubber-de
Copy link
Member

No, featureset for 2.7.3 is complete and this isn't as easy as i thought.
Anyway is still suggest to initialize components on page load outside of further (click) events to prevent this.

@dutrieux
Copy link
Contributor Author

I fund an other workaround with initialization of dropdown & modal on the click :

I disable the animation of the dropdown with the animation 'show' and re-enable animation 'horizontal flip' of dropdown on the onShow event :

https://jsfiddle.net/dutrieux/ajwfetgh/74/

awaiting its resolution :)

@dutrieux
Copy link
Contributor Author

Hi @lubber-de,
Do you have a eta of this bug, do you think you could solve it for the next release or ...

@lubber-de
Copy link
Member

@dutrieux TL;DR; No, cannot promise
As said, this isn't as easy as i thought and i still suggest doing all element initialization on page load outside of any further click events
Otherwise it seems the modal or any usage of the transition module has to check if the current module contains any other elements as siblings which are still in animation progress and then either stop them or wait for their end... imagine there would be several elements within the modal, this could get into more trouble .
But, as always, if you have an idea how to solve this in general, don't hesitate to create a proper PR to support FUI 😃

@lubber-de lubber-de added the tag/help-wanted Issues which need help to fix or implement label Apr 25, 2019
@lubber-de
Copy link
Member

Thanks a lot for your investigation and the provided PR!

@lubber-de lubber-de removed the tag/help-wanted Issues which need help to fix or implement label Apr 25, 2019
@lubber-de lubber-de added this to the 2.7.5 milestone Apr 26, 2019
@lubber-de lubber-de added tag/next-release/nightly Any issue which has a corresponding PR which has been merged and is available in the nightly build lang/javascript Anything involving JavaScript labels Apr 26, 2019
exoego pushed a commit to exoego/Fomantic-UI that referenced this issue Apr 30, 2019
When multiple modal is opened for the first time containing a dropdown the open animation was broken.

Closes fomantic#542
@y0hami y0hami closed this as completed in 353f90f May 16, 2019
@lubber-de lubber-de removed the tag/next-release/nightly Any issue which has a corresponding PR which has been merged and is available in the nightly build label Jun 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang/javascript Anything involving JavaScript type/bug Any issue which is a bug or PR which fixes a bug
Projects
None yet
Development

No branches or pull requests

2 participants