Custom arrow keys handling #5038
Labels
package:image
type:feature
This issue reports a feature request (an idea for a new functionality or a missing option).
Milestone
Extracted from: https://github.com/ckeditor/ckeditor5-engine/issues/696#issuecomment-263840273.
Custom widget handler for arrows
Use the view events (
keydown
orselectionChange
).Object selected
view#selectionChange
which currently implements the same behaviour).Document#getNearestSelectionPosition
with the right direction param to find the next possible position.Selection next to an object
DataController#extendSelection()
on a selection clone to probe what's next. If selection focus is before/after an object, it means that this object should be selected.Note: The above algorithm (the option 2a) will automatically work with the case when e.g. we selected an object at the beginning of the root and pressed left arrow. The focus will not be moved any further, so on its right side there'll still be that object and we'll reselect it. 🎉
The text was updated successfully, but these errors were encountered: