-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[Modal] { inverted: true } works only on the first run. #3192
Comments
This is a bug related to doc initialization (the modals are re-used in all the examples), but I don't believe a bug with SUI? |
I did some changes and now it works. Was need instantiate the modal only once. Here is the test case: |
I got the same unexpected behavior. Here is a common use case with an modal which lost it's inverted state after fired once: http://jsfiddle.net/8x15wobw/ dimmerSettings: {
variation: 'inverted'
} |
same problem here, even in the Examples pages the bug occurs: on the first call to inverted modal, the dimmer is clear, if you make a second call, the dimmer goes dark. |
During the second dimmer run the color was extracted from the DOM. At least Firefox automatically converts RGBA to RGB if possible which caused the bug. With this fix the dimmer module can now detect both RGB and RGBA colors.
fix modal/dimmer inverted bug Semantic-Org#3192
During the second dimmer run the color was extracted from the DOM. At least Firefox automatically converts RGBA to RGB if possible which caused the bug. With this fix the dimmer module can now detect both RGB and RGBA colors.
@larsbo , you should not instantiate your modal on every click. |
$('.ui.modal').modal({ inverted: true }).modal('show');
Shows the modal with white background. After you close it and then open it again the background is now black.
Run Code twice at "Dimmer Variations" section to see the bug:
http://semantic-ui.com/modules/modal.html#/examples
The text was updated successfully, but these errors were encountered: