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

For navmenu offcanvas push, bootstrap .modal disappears immediately #414

Open
hujinhui69 opened this issue Oct 23, 2015 · 1 comment
Open
Projects

Comments

@hujinhui69
Copy link

To produce:

set canvas to 'body', put .modal dialog under body, in slid-in state, if you trigger event to show the modal, it will disappear immediately after slid-in is completed.

After debugging, found messing around style is kind of not quite reliable. Because during slid-in and out, scripting can change the style of the element, and when hide() rolls back the changes, the changes made by scripting are lost. E.g., .modal is hidden before scripting bring it to screen, when 'show' is triggered, 'display: block' will be added dynamically to the .modal style. If this style is rolled back, it becomes hidden, that's exactly why .modal disappeared.

I saw there is exclude option, maybe I can exclude .modal so that .modal won't be collected although it meets position:fixed. But, in theory, if any element that happens to have position:fixed, and style is changed in slid-in state, the roll-back logic will lose all the changes.

Right now, I'm using reveal z-index approach instead, in which case canvas is limited, I only need to move all .modal under .canvas to body if modal-backdrop is in use.

It's quite possible I missed some easy settings to work around it.

A great plugin, saved me a lot of time. Thanks.

@Minstel
Copy link
Collaborator

Minstel commented Dec 4, 2015

@hujinhui69 You can simply use:
.modal.in { display: block!important; }

@jasny jasny added this to Todo in v3.2 Mar 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
v3.2
Todo
Development

No branches or pull requests

3 participants