[Dialogs] TypeError on double click

Hi,

my users sometimes report a TypeError which i was not able to reproduce until today.

The users are mainly Windows-User and hence used to doubleclick on things – even on the web. If you try to rename a page and commit the dialog with a (quick) doubleclick on change you can safely reproduce this issue:

TypeError: Cannot read properties of undefined (reading 'error') at a.onSubmit (index.js:formatted:2076:35)

The doubleclick also seems to be the reason for error reports when duplicating and deleting pages where the dialog says “page exists already” or “page is already deleted” which is correct from kirbys point of view as the first click of the doubleclick leads to intended change already.

So my question is: is there any way to prevent doubleclicks an any action link somehow?

Best, Thomas E.-E.

any idea how i could prevent doubleclicks? @texnixe ?

No, sorry. Maybe create a feature request or issue on GitHub.

It does not prevent double click, but you could try to disable the button temporally with JS and use setTimout() function to enable the button again.

1 Like

nice idea … thanks!

I am wondering if nobody faces the same issue? Even if we accept the fact, that each click is handled by kirby it would be good if the doubleclick does not lead to an error due to unset or undefined variables.

That’s why I said it might make sense to create an issue on GitHub.

done, see [Dialogs] TypeError on double click · Issue #4413 · getkirby/kirby · GitHub