If I create a modal and put a datepicker (or a timepicker) in it I expect it to work without freezing up my entire browser
Currently if you open a modal and put a datepicker (or timepicker) in it that has it's container set to "body" (to prevent sizing issues) it will cause an infinite loop which eventually freezes up the browser
We noticed that reverting to Alpha 4 fixed the issue, which leads me to suspect that the bug was introduced in commit https://github.com/Dogfalo/materialize/commit/da3f14834af2a35009e0cbd6b6f4a7dab3eb73c3
specifically the part where in the focus handler it calls focus again.
I created a codepen here (do note that attempting to open the datepicker twice sometimes causes the entire tab to freeze up)
Very nasty bug. Thanks a bunch for pointing this out. I now keep track of the order of modals opened, so only the last opened modal will trap focus preventing loops.
Fixed in 3ea4667a.
Most helpful comment
Very nasty bug. Thanks a bunch for pointing this out. I now keep track of the order of modals opened, so only the last opened modal will trap focus preventing loops.
Fixed in 3ea4667a.