remove hardcoded timeout by listening on transitions#13
remove hardcoded timeout by listening on transitions#13ianstormtaylor wants to merge 1 commit intocomponent:masterfrom
Conversation
|
this will probably fix issue #7 |
|
shit, this doesn't fix it. unfortunately it seems like there's no way to do this without knowing the element is transitioning, so this is just currently impossible because the spec is poorly done. |
|
Flip the |
|
mm definitely dumb on my part for having that before hand. seems to not work with version if i use https://github.com/anthonyshort/after-transition might be doing something else dumb, let me know. trouble again (i think) is that the animation is pure css, no inline styles |
|
I usually just toggle classes on and off and it works ok. The change I made to that component in those versions (I think) was changed from checking if the browser is capable of doing to transitions, to actually checking the Soooo by doing the afterTransition and THEN doing the class, it will check the style, see there are no transition properties, and then just execute it straight away. I think I just need to figure out which is better for the component - check the capabilities (even if the element has no transitions) or check the element for transitions. |
|
Actually, looking at how I'm checking it, it's only checking the I might just make |
|
I pushed rebased and updated version of this to
|
When hiding overlay we keep it in the DOM tree for a short amount of time to make sure that CSS transition is visible. For most browsers it does not matter how long is that period, because our CSS prevents hidden overlay from capturing any pointer events. Since IE < 11 does not support `pointer-events` property for CSS[1], hiding overlay keeps browser unresponsive for ~2s. This commit shortens that period to 350ms, which should allow transition to complete, and make IE usable a bit faster. fixes #7 see #13 for a fix that removes hardcoded timeout [1]: http://caniuse.com/#search=pointer-events
really cool component by @anthonyshort that lets us remove hardcoded timeouts for waiting for transitions, looking to use overlay with a
.3stransition instead and figured this would make a good fix