instantpage / instant.page

Make your site’s pages instant in 1 minute and improve your conversion rate by 1%
https://instant.page
MIT License
6.04k stars 205 forks source link

Problems with event.preventDefault() and links #69

Open SimonMayerhofer opened 4 years ago

SimonMayerhofer commented 4 years ago

With the new update clicks on links which have a click listener which prevents opening the link are not working anymore. The link will open regardless of preventDefault.

Made an example here: https://codepen.io/maysi/pen/b492d4c51109a85c8cb5fbd9a41f083b

PikachuEXE commented 4 years ago

The new "shortcut" basically triggers a click event on mousedown I also got issue with my dropdowns opening on mousedown and closing on mouseup

jerryc127 commented 4 years ago

Yes, the new version have big problem.

it cause the fancybox not work.. when click the image, it will run the fancybox and show the widget. but now it will open the another tab and show the photo.

also, it cause my another button not work. it will call twice when i click the button.

i have change the script back to old version.

iamakulov commented 4 years ago

This release also breaks two classical UX patterns:

chemicalkosek commented 4 years ago

It breaks some stuff for me also. Tabs from Foundation: https://get.foundation/sites/docs/tabs.html It also breaks jQueryUI Datepicker (changing months with arrows): https://jqueryui.com/datepicker/

Had to use data-instant-no-mousedown-shortcut on body everywhere.

  • Cancellation: you can start clicking a link or a button (by pressing the mouse button down) – but then change your mind, move the pointer away, and release the mouse button

That was my main issue at first also.

LukaszJaro commented 4 years ago

I opened a issue with drop downs automatically closing when you click on them #71

WordPress plugin is unreliable at the moment and not safe to use in production.

kurtextrem commented 4 years ago

Pretty sure this can be fixed by setting cancelable: true. PR incoming.

marcoczen commented 4 years ago

Hi ... is this issue fixed ?

SimonMayerhofer commented 4 years ago

Hi ... is this issue fixed ?

Yes, it's fixed in https://github.com/instantpage/instant.page/commit/6d41fe5b8a5055278ef0b9982c3b6bcc79553f43