Modal 'shown' event breaks when class 'in' is added
As per this fiddle: http://jsfiddle.net/aranm/J2aAk/1/
The modal is shown immediately and the shown event is not fired. If the modal's cancel button is hit the shown event will fire. The second time the modal is opened the shown event fires immediately.
If the 'in' class is removed behaviour works as expected, example here :http://jsfiddle.net/aranm/Pm4vL/1/
I am getting the same problem and the same workaround (thanks for that). Not sure what the "in" class does, we probably just copied that from some example.
The "in" class makes the modal slide in from the top of the screen. I'd like to be able to use it.
Unable to vote for this issue, so I'll post here. I have the same behaviour with in class as well. And workaround is to remove in class.
Not sure if this is relevant or not, but you can make it fire by hovering the mouse over a .btn class object. However, it doesn't help as there's no practical programmatic access to do that. Removing in does fix it however.
Interesting. I'm not getting 'show' event triggered even when removed 'in' class - but I find it keeps added dynamically when show is JS-triggered (which isn't supposed to happen in this case)? Same with 'hidden', 'hide' events.
don't put in on it? how is this an issue…
@fat without the 'in' class the modal does not slide into view. It just appears immediately. I would like the modal to slide in from the top of the screen. It is the intended behaviour, it was put there for a reason. This is an issue.
@fat If this is not reopened I guess I will just have to recreate the issue in a new one. This is an issue for a number of people, has never been addressed and has been closed previously (in another issue). I'm quite annoyed that without understanding the problem, this is just treated as irrelevant and closed.
@fat There is definitely something broken here.
I'm having also another issue which could perhaps be related. That when the class "fade" is in a modal window, focus on input is blurred after the modal appears. If I remove that class, well - it doesn't fade. Perhaps I could make a custom transition class but that doesn't solve the problem - things aren't working as supposed. See here: https://github.com/twitter/bootstrap/issues/8107
if you want it to slide in - call slide on the modal with js on page load