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

Fix: Nested editable on Safari. #17809

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Fix: Nested editable on Safari. #17809

wants to merge 2 commits into from

Conversation

gorzelinski
Copy link
Contributor

Suggested merge commit message (convention)

Fix: Nested editable on Safari. Closes #17383.


Additional information

For example – encountered issues, assumptions you had to make, other affected tickets, etc.

@gorzelinski gorzelinski requested review from arkflpc, Mati365 and niegowski and removed request for Mati365 January 24, 2025 08:03
// Handle Backspace key while inside a nested editable on Safari. See #17383.
this.listenTo<ViewDocumentKeyDownEvent>( viewDocument, 'keydown', ( evt, data ) => {
if ( viewDocument.isComposing ||
data.keystroke != keyCodes.backspace && !data.metaKey ||
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This condition solves the problem mentioned in the issue but introduces a new one. It's too broad. But I'm not sure how to make it more strict. Each time I tried, something else broke. Hmm...

Copy link
Contributor

@pszczesniak pszczesniak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add tests to cover proposed solution and to make 100% of CC.

@gorzelinski
Copy link
Contributor Author

Please add tests to cover proposed solution and to make 100% of CC.

I fixed the solution with the help of Kuba, and I am working on it :)

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.

Deleting an empty block at the beginning of an editable block widget removes itself and parent widget
2 participants