Conversation
9f16e92
into
fix/add_tests_for_latest_updates_test
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5be28d9d5f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| private void startPanning(View view, MotionEvent event) { | ||
| panningActive = true; | ||
| panGestureOwned = true; |
There was a problem hiding this comment.
Cancel EditText touch handling when owning a pan
When the second finger makes the listener own the gesture, EditText.onTouchEvent has already received the initial ACTION_DOWN, but this listener now consumes every remaining event, including the final ACTION_UP or ACTION_CANCEL. The editor therefore never clears its pending tap/long-press and pressed state, so a quick two-finger pan can trigger a delayed long-click or selection at the first touch location after both fingers are released. Send the editor a cancellation event when taking ownership before swallowing the rest of the stream.
Useful? React with 👍 / 👎.
| if (horizontalScrollBoundsDirty || cachedHorizontalScrollEditorWidth != editorWidth) { | ||
| cachedMaxHorizontalScroll = calculateMaxHorizontalScroll(layout, editorWidth); | ||
| cachedHorizontalScrollEditorWidth = editorWidth; | ||
| horizontalScrollBoundsDirty = false; |
There was a problem hiding this comment.
Invalidate cached bounds after background reloads
When an unchanged open document is modified externally while the activity is paused, onResume calls validateOpenDocumentOnForeground() before reattaching textWatcher, so the resulting setEditorText() never invokes the new invalidation in onTextChanged. If the replacement changes the longest line without changing the editor's dimensions, this condition reuses the old maximum and horizontal panning either cannot reach the new text or scrolls beyond shorter text until another edit, preference change, or resize invalidates the cache.
Useful? React with 👍 / 👎.
No description provided.