Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

onBlur and onEnter submit error #11

Closed
rossinspired opened this issue Jan 5, 2024 · 6 comments
Closed

onBlur and onEnter submit error #11

rossinspired opened this issue Jan 5, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@rossinspired
Copy link

rossinspired commented Jan 5, 2024

Describe the bug

If I have both onBlur and onEnter set to Action.Submit, then I get this error in the Console:
"Uncaught (in promise) DOMException: Failed to execute 'replaceWith' on 'Element': The node to be removed is no longer a child of this node. Perhaps it was moved in a 'blur' event handler? at malle.js:110:23"

onBlur seems to work either way.
But if I change onBlur to Action.Ignore, then onEnter works as expected.

Should it not allow both onBlur and onEnter to use Action.Submit ??

Information

  • malle version: 2.5.2
  • Client operating system (e.g: MacOS, Windows, GNU+Linux): macos
  • Browser (e.g. firefox, chrome): chrome
NicolasCARPi added a commit that referenced this issue Jan 5, 2024
@NicolasCARPi
Copy link
Contributor

Hello, I cannot reproduce this behavior. What is your browser version? Can you reproduce with another browser?

Can you reproduce on the demo? I have just added a section "Setting behavior for both Blur action and Enter keypress" with both blur and enter leading to submit. Works fine for me with both Firefox or Chromium.

@rossinspired
Copy link
Author

I'm on an older version of Chrome (Version 120.0.6099.109 (Official Build) (x86_64))
I received the same behavior on safari and firefox.
I downloaded the demo files and received the same behavior.

@NicolasCARPi
Copy link
Contributor

I'm sorry but without a reproducible bug, it will be hard to fix.

Could you record a video showing the problem? Maybe there is something that we missed in the bug description and that is important. Sometimes I ask for a video and immediatly understand the user problem because they were doing something weird (normal for them, weird for the app).

If it's reproducible with several browsers and also on the demo code, then we can assume the issue is not on your side. But it would still be useful to know:

  • what operating system are you using, add complete version number (assuming MacOS)
  • what are the versions of firefox and safari?
  • can you reproduce on another computer? (you can simply browse to the demo website and try it there).
  • also you said "I downloaded the demo files", can you try it online on the provided link? (https://deltablot.github.io/malle/ section "Setting behavior for both Blur action and Enter keypress")

I just want to isolate as much as possible the issue.

Also, is it 100% of the time erroring out or sometimes it works?

@catja77
Copy link

catja77 commented Nov 12, 2024

I can see the error 100% on Chrome. In the movie, from https://deltablot.github.io/malle/, I just remove some text and press enter and you can see the error in the chrome dev console.

Skarminspelning.2024-11-12.kl.08.23.07.mov

@NicolasCARPi
Copy link
Contributor

@catja77 Thank you for the video. I will try and have a look at this issue.

@NicolasCARPi
Copy link
Contributor

The bug only appears on Chromium based browsers, not firefox. Version 2.6.2 will contain a fix for this issue!

@NicolasCARPi NicolasCARPi added bug Something isn't working and removed not reproducible labels Nov 14, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants