New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keycode of delete still working when reactFlow is blur #4263
Comments
It was meant to be a feature but I understand that it can be annoying. Currently all key event handlers are bound to window which could be changed to the wrapper. I will leave this open until we have a solution / decision for this. |
You mean "useKeyPress" hook? I use it In my app, such as : what is the right way to use this hook? |
@a1528zhang not just a |
@bcakmakoglu Sure, my code actually is: |
Did you disable the delete key code on the ReactFlow component? |
@bcakmakoglu Just try it, still not working |
What exactly isn't working? ^^ Your keycode listener? Disabling the delete key code should at least disable the removal of nodes initiated by ReactFlow - that much should work, yes? |
@bcakmakoglu Not working means: when I click element outof reactflow(that trigger onBlur callback), backspace still can delete selected node. And yes, set What confuses me is: when onBlur callback of reactflow triggered, some keyCode is disabled, like arrow button, but backspace is still working. Seems like backspace is different from othen keyCode |
The arrow keys don't use
Although your |
@bcakmakoglu Thanks for your explanation, waiting for your research result |
Describe the Bug
when reactflow is blur, press backspace still woring, but other keycodes not working such as up & down arrow
Your Example Website or App
No response
Steps to Reproduce the Bug or Issue
`
...
return (
console.log("focus")} onBlur={() => console.log("blur")} ... />
);`
2. click reactflow panel print "focus", all keycodes are working
3. click div print "blur", all keycodes not working except backspace, node can be deleted
Expected behavior
when reactflow is blur, backspace should not working
Screenshots or Videos
20240508-170012.mp4
Platform
Additional context
No response
The text was updated successfully, but these errors were encountered: