up-blur when clicking another element prevents the click event
#764
Unanswered
choucavalier
asked this question in
Q&A
Replies: 1 comment 2 replies
-
|
I'm not sure how you wired up Maybe you can post a minimal reproduction of your issue? We have a StackBlitz template that already loads Unpoly for you: https://stackblitz.com/edit/empty-unpoly-project?file=index.html
There is no |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have several form fields of an object that can individually be edited.
I have a page that both
<input>and can be modified (let's call this the "edit" mode)Only one field can be edited at a time. Whenever the user clicks outside an element that is in "edit" mode, it goes back into "view" mode (the
<input>is removed and replaced by some other HTML). I use theblurevent to listen for a click outside the<input>element to render it back into its "view" mode counterpart.Let's say input A is currently in "edit" mode, and the user clicks on some input B that is currently in "view" mode. This currently only toggle input A into "view" mode, but does not switch input B into "edit" mode.
Note that the whole toggling between "edit" and "view" mode is actually being done using
[up-validate]and rendered server-side.It seems that the
blurevent is received but theclickevent is not propagated.What is the right way to deal with that situation?
Beta Was this translation helpful? Give feedback.
All reactions