-
-
Notifications
You must be signed in to change notification settings - Fork 331
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
[Transition] Remember inline style display and dont show hidden objects like <script> #357
[Transition] Remember inline style display and dont show hidden objects like <script> #357
Conversation
…nline hidden content or script tags
Just found out i had to make an explicit check for |
Sorry, It seems I broke it for the docs.. I put this on hold until I fixed that also... |
… option, so it does not break other components and only accordion needs this so far,
Fixed it 💦 ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
Transition did always detect "block" as display value and did not respect or remembered an initial given inline block style which was probably wanted by the user. For example
inline
or evennone
, if an element within a transition should definately not be shown.Not only because of this, but it was also displaying
script
or other unwanted tags 🙄script
,link
orstyle
tags are now skipped all the time.Especially for accordion it turns out to be usefull that transition should be skipped if the item has initially been set to be hidden. This is true in most cases for the to be animated element itself, but in an accordion there could be some elements within the container where those elements should be kept hidden.
Therefore i added a new setting
to the transition module.
The accordion module uses this now to still hide any child element of a accordion container (not the container itself!) in case a child element was already initially hidden.
See the source of the fiddle below for better explanation 😉
For additional testing i injected the new transition.js into all of my local
gh-pages
-branch to make sure no other components had negative side effects (way too many examples otherwise to put into a fiddle)If you also want to test it, you can simply:
In the following docs html files: accordion, popup,dimmer,transition,form, search, modal, toast, visibility,modal,dropdown (those modules make use of transition.js , thats why. The docs itself use transition.js on every page)
Testcase
Broken
http://jsfiddle.net/qLp3md9n/
Fixed
http://jsfiddle.net/qLp3md9n/2/
Closes
Semantic-Org/Semantic-UI#2988
Semantic-Org/Semantic-UI#3171
Semantic-Org/Semantic-UI#6735