Update modals.js

Added click handler for desktop compatibility