Event on checkbox input trigger twice :/ #2189
Replies: 2 comments 2 replies
-
OK, I've a way def foobar(ev):
ev.stopImmediatePropagation()
print('test') Thanks to: https://javascript.info/bubbling-and-capturing This is insane, on all the others elements no problem at all when binding an a event but just on the checkbox this cause a double trigger.. 🤦♂️ So side question, where that weird behavior come from ? Because I would like to inform the dev team about it. DOM Standard ? Cheers. |
Beta Was this translation helpful? Give feedback.
0 replies
-
This is strange. Can you post an example where you get this behavior ? In this example the callback function is called only once <script type="text/python">
from browser import bind
@bind('#test', 'input')
def test(ev):
print('ok')
</script>
<input type="checkbox" id="test"> |
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.
-
Hi everyone,
I'm using
bind()
quite a lot with Bryhton and so far no problem until now.I've got
So when I tick this checkbox in the browser it trigger twice and I get twice in the console 'test'
I've searched the WWW and it seem I'm not the only one... I've tried all the solution but it still happening... any ideas ?
I've tried also with the following event : click, change, input. but still the problem remain,
Beta Was this translation helpful? Give feedback.
All reactions