bootstrap
bootstrap copied to clipboard
Fix keyboard navigation for contenteditable elements
Description
If the target is a contenteditable element, then there's no need to process the next steps like for input and textarea elements because it won't work correctly.And also event.preventDefault() will prevent moving up or down inside the editable content.
Type of changes
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Refactoring (non-breaking change)
- [ ] Breaking change (fix or feature that would change existing functionality)
Checklist
- [x] I have read the contributing guidelines
- [x] My code follows the code style of the project (using
npm run lint) - [ ] My change introduces changes to the documentation
- [ ] I have updated the documentation accordingly
- [ ] I have added tests to cover my changes
- [x] All new and existing tests passed
Live previews
Related issues
Closes Dropdown prevents default actions for contenteditable elements on Up/Down arrow keys #41021
I think this checks out for me @julien-deramond—pretty focused fix for the linked issue.