fgelinas / timepicker

A jQuery UI Time Picker
http://fgelinas.com/code/timepicker
GNU General Public License v2.0
266 stars 84 forks source link

Timepicker not closing when in an iFrame and using Firefox, IE9, Opera. #68

Open bongobongo opened 11 years ago

bongobongo commented 11 years ago

I'm testing your nifty jQuery timepicker in an iframe. In Firefox, IE9, and Opera (latest), it will not close it when used in iFrame.

In Chrome and Safari it works fine.

I have same code in a page not using iFrame, there it works as it should.

I'm also using jQuery datepicker (the standard one) in the same pages as for the timepicker. That also has an issue not closing on a date select, when in an iframe. There I made a fix using: onSelect: function(selectedDate) { $('#ui-datepicker-div').hide(); }

I was thinking about using the code below for a workaround with your timepicker:

I was hoping to be able to do something similar in timepicker: onSelect: function(time, inst) { // do something here }

But my problem is that I need to be able to detect the dblclick or second click in the timepicker. So far I have not figured out what kind of code to use in order to know if to close the timepicker or not. onClose is not triggered, so cannot be used (AFAIK). If there was a flag set when the close conditions where met, and I could test that flag, then it should be easy...

So... do you know how I can make timepicker to close properly when used inside an iFrame, with the problem browsers mentioned above? Either by some nifty workaround code inside onSelect, or if you mabe fix this in main code of timepicker. Do not know if this is a bug or if it is browser issues.