theKashey / react-focus-on

🎯 Solution for WAI ARIA compatible modal dialogs or full-screen tasks, you were looking for
MIT License
336 stars 14 forks source link

fix: fixes onClickOutside on iOS devices. fixes #13 #14

Closed benoitgrelard closed 5 years ago

benoitgrelard commented 5 years ago

Hi @theKashey,

This is the PR I had a in mind in order to fix #13. I am pretty sure about the addition of the touchstart handler. However I wasn't sure whether or not I should add the code around the setLockProps (See this) It seems like it should be added but you're probably more aware of it than me.

Let me know what you think of the fix.

✌️

theKashey commented 5 years ago

It should be abstracted away for the customer, for only onClick should be present in the public interface.... But you haven't changed it. The only difference between onclick and touch is - it shall be touchend, not touchstart. Technically in this case you even dont have to add anything to LockProps - React would handle "touch click". However - Preack will not.

So 👍, I'll just replace touchstart with touchstart.

benoitgrelard commented 5 years ago

You’ll replace touchstart with touchend you mean right? Let me know when this gets released as well so I can update the package my side. Thanks!

theKashey commented 5 years ago

👍, give me some time to test the result.

theKashey commented 5 years ago

Released!