Skip to content
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

enh: much better fileComponent keyboard experience #1267

Conversation

SystemChanger
Copy link
Contributor

@SystemChanger SystemChanger commented Jun 29, 2023

When there is selected component (by resizing controls):

  1. Typing text keys (e.g. A-Z, 0-9) now replaces the selected component
    Logic there is the same as for text nodes - it acts like if the component/image is a selected range of text. Unification.
  2. Enter inserts a new line after the selected component and sets the carriage position on it (corresponding to the behavior of the insert line below button)
  3. Shift+Enter inserts a new line before the selected component and sets the carriage position on it (corresponding to the behavior of the insert line before button)

@JiHong88, try it. It is pretty nice and intuitive right now! This is the behavior I was expecting by default.
P.S. I hope my way to remove/destroy the container is sufficient (on typing text keys): util.changeElement(container, format);
New behavior also prevents some nasty bugs and oddities on typing text when resize controls are active. Try it with other PR's altogether.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants