-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Prevent Default on Ctrl + Backspace in ReactFlow #706
Conversation
…ation to improve user experience 🐛 fix(AccordionComponent/index.tsx): prevent default behavior of Backspace key to improve user experience 🐛 fix(floatComponent/index.tsx): prevent default behavior of Backspace key to improve user experience 🐛 fix(inputComponent/index.tsx): prevent default behavior of Backspace key to improve user experience 🐛 fix(inputListComponent/index.tsx): prevent default behavior of Ctrl+Backspace key combination to improve user experience 🐛 fix(intComponent/index.tsx): prevent default behavior of Backspace key to improve user experience 🐛 fix(genericModal/index.tsx): prevent default behavior of Backspace key to improve user experience
🐛 fix(frontend): remove unnecessary merge conflict markers in reactflowUtils.ts file
… the application to improve user experience
Waiting for definitions to finish the Pull Request. |
…+backspace event The code related to preventing the control+backspace event in the application was removed as it was no longer needed.
…and improve code semantics feat(reactflowUtils.ts): add getConnectedNodes function to retrieve connected nodes based on an edge fix(styleUtils.ts): remove unused getConnectedNodes function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not working yet, great improvement, but when using ctrl-backspace on whitespace the node is deleted.
…on of keyboard event when pressing Ctrl + Backspace on input value that matches block or ends with a space character to improve user experience
Could you please double-check if everything is alright now? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The bug is still happening.
Please test using the following steps:
- Drop a PromptTemplate
- Duplicate it a few times
- Open one, write something and hit CTRL+backspace 2 times.
- You'll have one less PromptTemplate on screen.
…characters in strings 🔧 fix(reactflowUtils.ts): update handleKeyDown function to prevent deletion of block when a special character is the last character in the input value
Please, kindly reevaluate to confirm if the bug has been resolved at this point. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
worked as a charm
…event in handleKeyDown function 🐛 fix(reactflowUtils.ts): fix handleKeyDown function to properly handle special characters and backspace key
…ion on Windows/Linux and Mac
…sRegex to include them as special characters
Fixes the issue where using Ctrl + Backspace in ReactFlow caused unwanted default behavior. This pull request addresses the problem by preventing the default action when the user presses Ctrl + Backspace, allowing for a smoother and more intuitive experience when interacting with the application.
🐛 fix(App.tsx): prevent default behavior of Ctrl+Backspace key combination to improve user experience
🐛 fix(AccordionComponent/index.tsx): prevent default behavior of Backspace key to improve user experience
🐛 fix(floatComponent/index.tsx): prevent default behavior of Backspace key to improve user experience
🐛 fix(inputComponent/index.tsx): prevent default behavior of Backspace key to improve user experience
🐛 fix(inputListComponent/index.tsx): prevent default behavior of Ctrl+Backspace key combination to improve user experience
🐛 fix(intComponent/index.tsx): prevent default behavior of Backspace key to improve user experience
🐛 fix(genericModal/index.tsx): prevent default behavior of Backspace key to improve user experience