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

Improved fix for IllegalArgumentException: Center point is not inside any of the rectangles #1094

Open
wants to merge 6 commits into
base: trunk
Choose a base branch
from

Conversation

khaykov
Copy link
Member

@khaykov khaykov commented Nov 27, 2024

Fixes #880 880

This is an improved fix for the crash when selecting empty editor with an end of buffer marker in it.

Original fix addressed case where you press on "Select All", but the problem is that some devices have their own option for selecting text in addition to "Select All". My One Plus device has a "Select" option that causes the crash as well. Problem with this, is that each manufacturer has a different ID for that button, and we can't catch them all. I added the logic for catching other select events into the onSelectionChanged.

Test

If you have a device with an additional "Select" option in context menu.

  1. In main activity set content of the editor to this aztec.visualEditor.fromHtml("<ol><li></li></ol>"). We use list to be able to see the span.
  2. Long press in the editor and tap on "Select"
  3. Notice that app does not crash.

If you do not have a device with a "Select" option, you can still test the functionality by commenting out this part.

  1. In main activity set content of the editor to this aztec.visualEditor.fromHtml("<h1></h1>").
  2. Long press in the editor and tap on "Select All"
  3. Notice that app does not crash.
  4. Smoke test behavior around empty block span (eg. list) in editor.

Make sure strings will be translated:

  • If there are new strings that have to be translated, I have added them to the client's strings.xml as a part of the integration PR.

@khaykov khaykov added the Core label Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash IllegalArgumentException: Center point is not inside any of the rectangles
1 participant