[Question] Why is the click event handler blocking propagation? #3194
-
My question is pretty straightforward: why is the click event blocking propagation? It is really annoying because I wanted a user to select a file from an HTML game, so I created a file input element via the dom and triggered the click event with |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
Maybe for avoid to select/hightlight the canvas in the webview and other things. |
Beta Was this translation helpful? Give feedback.
-
Yes exactly. Though if you think of a better solution or if it's useless, feel free to try to remove it and see how it goes :) |
Beta Was this translation helpful? Give feedback.
-
Maybe removing not removing, but at least some way to disable it, or to put event handlers before it. Maybe by making the function a static function of the runtimegame renderer, so that I can use removeEventListener and then addEventListener again. |
Beta Was this translation helpful? Give feedback.
-
I would recommend that you for now hack/remove it and see if you can have something working in your case. I'm not sure what is the best solution (temporarily remove the prevent default on demand, always remove it, make it configurable, etc...) and well know more with a use case :) |
Beta Was this translation helpful? Give feedback.
-
The problem is there is no way I can remove it without having the original function handling the event.
…________________________________
From: Florian Rival <[email protected]>
Sent: Monday, July 20, 2020 7:30:25 PM
To: 4ian/GDevelop <[email protected]>
Cc: Arthur Pacaud <[email protected]>; Author <[email protected]>
Subject: Re: [4ian/GDevelop] [Question] Why is the click event handler blocking propagation? (#1880)
I would recommend that you for now hack/remove it and see if you can have something working in your case. I'm not sure what is the best solution (temporarily remove the prevent default on demand, always remove it, make it configurable, etc...) and well know more with a use case :)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#1880 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AETT4LSVM5SJ4SQT5ZJGBYLR4R5LDANCNFSM4PCGJTFQ>.
|
Beta Was this translation helpful? Give feedback.
Maybe for avoid to select/hightlight the canvas in the webview and other things.