Repository navigation
[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 |
Replies: 5 comments
|
Maybe for avoid to select/hightlight the canvas in the webview and other things. |
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 :) |
|
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. |
|
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 :) |
|
The problem is there is no way I can remove it without having the original function handling the event.
…________________________________
From: Florian Rival <notifications@github.com>
Sent: Monday, July 20, 2020 7:30:25 PM
To: 4ian/GDevelop <GDevelop@noreply.github.com>
Cc: Arthur Pacaud <arthur.pacaud@hotmail.fr>; Author <author@noreply.github.com>
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>.
|
Maybe for avoid to select/hightlight the canvas in the webview and other things.