Hi,
Is there any simple script that allows me to assign the ".close-modal"button to the “esc” key on the keyboard?
Thank you,
G
Here is my site Read-Only: LINK
(how to share your site Read-Only link)
Hi,
Is there any simple script that allows me to assign the ".close-modal"button to the “esc” key on the keyboard?
Thank you,
G
Here is my site Read-Only: LINK
(how to share your site Read-Only link)
Link to custom code solution below. Although I do think an out-of-the-box modal component that’s accessible is really missing from Webflow. Such a common element!
https://webflow.com/website/Closing-modal-window-on-the-ESC-button-99ui8
Meanwhile published by webflow:
Further solution by finsweet
I actually found Finsweet’s accessible modal component first, ha.
I prefer using a Webflow developer’s solution (for no good reason). However, their custom code seems to break/override the smooth fade out close interaction.