Skip to content

Move resize handle to lower left#356

Open
jason00111 wants to merge 1 commit into
rugk:mainfrom
jason00111:move-resize-handle
Open

Move resize handle to lower left#356
jason00111 wants to merge 1 commit into
rugk:mainfrom
jason00111:move-resize-handle

Conversation

@jason00111
Copy link
Copy Markdown

@jason00111 jason00111 commented May 9, 2026

Problem:

In LTR locales, the resize handle sits in the lower right of the popup. The right edge of the popup is fixed below the extension icon, so that edge can't move. When the handle is dragged, the popup grows from the left instead, which is disorienting.

Solution:

Move the resize handle to the lower left, so it's on the edge that actually moves.

Implementation:

The resize handle is a property of the textarea, and it is placed in the lower left automatically when the element's direction is RTL. We don't want to flip the direction on the textarea itself, since user-entered text should display in its natural reading direction.

So this PR:

  • Moves the resize handle from the textarea to the body.
  • Sets direction: rtl on the body (so the handle ends up on the left).
  • Sets direction: __MSG_@@bidi_dir__ on the body's children, so content still respects the user's locale. __MSG_@@bidi_dir__ is copied from CommonCss.
  • Updates resizeMutationObserver to observe the body instead of the textarea, since the body is now what resizes.

Copy link
Copy Markdown
Owner

@rugk rugk left a comment

Choose a reason for hiding this comment

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

Hi @jason00111,
first of all, thanks for your first contribution to this project! 🎉 👍 🏅
I hope you'll like this project and enjoy hacking on it… 😃

This looks like a good contribution. Do you have a screenshot (or even better screencast) to see that it works as intended (with RTL languages and with LTR also still works)?

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.

2 participants