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

In some cases bootstrap-modal does not work #240

Closed
mysuim opened this issue Sep 18, 2011 · 26 comments
Closed

In some cases bootstrap-modal does not work #240

mysuim opened this issue Sep 18, 2011 · 26 comments
Labels

Comments

@mysuim
Copy link

mysuim commented Sep 18, 2011

I'm not sure why this is, but the problem does exist.
If I do not set ‘keyboard’ option, it can be normal.

@fat
Copy link
Member

fat commented Sep 18, 2011

Hm... that's pretty vague. Can you give more information? I haven't run into any issues with it. How are you using? Could you provide a code example? maybe a jsfiddle?

@mysuim
Copy link
Author

mysuim commented Sep 19, 2011

in this place:http://twitter.github.com/bootstrap/javascript.html.
Only have this problem in firefox. in ie/chrome, is good.
You can reproduce this problem by following these steps:
1.click "Launch Modal" button
2.press escape key , close the modal
3.Repeat the above steps several times(Sometimes two or three times, sometimes ten times)

The problem does exist, my English is not good, not well described

@fat
Copy link
Member

fat commented Sep 19, 2011

Yep i see. Thanks, taking a look now

@fat
Copy link
Member

fat commented Sep 19, 2011

Works now - thanks for reporting!

@fat fat closed this as completed Sep 19, 2011
@mysuim
Copy link
Author

mysuim commented Sep 19, 2011

In this place:http://twitter.github.com/bootstrap/javascript.html, the problem does exist.

You can reproduce this problem:
Non-stop hits and non-stop press escape key.

@fat
Copy link
Member

fat commented Sep 19, 2011

hard refresh firefox -- it works for me now

@mysuim
Copy link
Author

mysuim commented Sep 19, 2011

hard refresh, reload, clean cache, I have done.

No, there are still problems

Re-tried many times.

you can try:Non-stop hits and non-stop press escape key.

@fat
Copy link
Member

fat commented Sep 19, 2011

can you check something for me.

if you go to this page: http://twitter.github.com/bootstrap/1.3.0/bootstrap-modal.js

can you search for // force reflow. Is it there for you?

@fat
Copy link
Member

fat commented Sep 19, 2011

oh wait -- do you mean, click the button 1million times really fast?

@fat fat reopened this Sep 19, 2011
@mysuim
Copy link
Author

mysuim commented Sep 19, 2011

I can see 'force reflow'.

click button and press esc key, qucikly, non-stop

@fat
Copy link
Member

fat commented Sep 19, 2011

yeah i see what you mean... looking into that

@williballenthin
Copy link

I'm having this issue as well. I can provide additional information as necessary, just ping me.

@fat
Copy link
Member

fat commented Sep 26, 2011

just a heads up, if you don't use animation this bug isn't present. It only occurs in firefox because they are dropping css animations as an optimization when you trigger many really fast.

@mdo
Copy link
Member

mdo commented Oct 27, 2011

@fat Do we close this or wait to fix it in dev or 2.0-wip?

@fat
Copy link
Member

fat commented Oct 27, 2011

It's still a problem. I haven't figured out a way to fix it in firefox. :(

@SubaruWRX55
Copy link

i was able to get the same problem on chrome too, but much less frequently. I'm working around the problem by disabling animation on modal.

@fat
Copy link
Member

fat commented Nov 1, 2011

Fixed in dev - this will be released with 1.4

@fat fat closed this as completed Nov 1, 2011
@mariozig
Copy link

mariozig commented Nov 7, 2011

Thanks fat!

@fat
Copy link
Member

fat commented Nov 7, 2011

no problem :)

@tmcallister
Copy link

I am using 1.4 and the modal usually fails on Firefox and IE. I removed the fade class for the time being, but it doesn't look nearly as good...

@mariozig
Copy link

@tmcallister are you using these steps to reproduce: #240 (comment) ?

I ask because i definitely saw this issue happening frequently in Firefox 8.0.1 (mac) but after @fat 's close on the 31st i've not seen it again.

@fat
Copy link
Member

fat commented Dec 13, 2011

@tmcallister can you confirm you're using the lastest code from master? I don't see how it could be possible with the current implementation

@tmcallister
Copy link

@mariozig it usually fails on first attempt. Same behavior, it just doesn't display.

@fat I have just tried both live linking to 1.4.0 and also pulled down latest code. Same behavior with either.

More info:

I develop on a Mac

  • Safari 5.0.5 - Never had a problem
  • Firefox 8.0.1 - Usually does NOT work
  • Chrome 16.0.9 - Always works, but sometimes the header is not displayed.

I test windows browsers in a Fusion VM using Windows XP.

  • Firefox 8.0.1 - rarely if ever works
  • IE 8.06 - usually, but not always works. Sometimes does not display header.

I have field reports from alpha users (using WIndows browsers) that the modal usually does not work in newest versions of FF and IE9. Field reports it works in Chrome.

@webdpro
Copy link

webdpro commented Dec 13, 2011

@tmcallister

Not sure what you code looks like but I was having the same problem in FF, when I would click on the link it would not work the first time but the second click it would work. Anyhow I update my call to include "show" and it works on the first click now.

$("#dialog").modal({show:true, backdrop:true})

Not sure if it will help but it fixed it for me.

@tmcallister
Copy link

Heres the generated code. Please excuse some of the goofy names, its test data. As discussed in this thread, removing the fade class totally eliminates the problem. Maybe there is something wrong in the code :-/

          <div id='MollyManager346' class='modal hide fade'>
           <div class='modal-header'>
               <a href='#' class='close'>&times;</a>
               <h3>Add Molly Manager shift on Mon, Dec 12</h3>
           </div>
           <div class='modal-body'>
               <form accept-charset="UTF-8" action="/shifts" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /><input name="authenticity_token" type="hidden" value="LDyT8kM/5xeVkT5xPwkOpltahvos+FilMUl9LobJ7vw=" /></div>                    
               <input id="person_id" name="person_id" type="hidden" value="3" />
               <input id="start_date_string" name="start_date_string" type="hidden" value="Dec 12, 2011" />                          
                <div class=" clearfix" id="user">
                  <label for="user">Position</label>
                    <div class="input">
                      <select id="position_id" name="position_id"><option value="2">Front desk</option></select>            
                    </div>
                </div>
                <div class=" clearfix" id="parse_hours_input">
                  <label for="parse_hours">Hours</label>   
                    <div class="input">
                      <input id="parse_hours" name="parse_hours" type="text" />
                  </div>
                </div>
                <div class=" clearfix" id="parse_hours_input">
                  <label for="comments">Comments</label>   
                    <div class="input">
                      <textarea id="comments" name="comments"></textarea>
                  </div>
                </div>
                  <div class="actions">
                    <input class="btn large primary" name="commit" type="submit" value="Add shift" />
                  </div>

@tmcallister
Copy link

I can properly view the demo page modal using the various browsers I reported on above.
http://twitter.github.com/bootstrap/javascript.html#overview

Thats pretty clear evidence the problem is on my side. I'll try and troubleshoot.

Thanks for responding so quickly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants