镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

[rtl resize] In RTL resize, when I try to shrink it, it gets bigger instead #2002

Open

Description

@TokeyJerry

Describe the bug

In the case of rtl, the left and right operations of the resize function are reversed. You can refer to the example provided below.

Your Example Website or App

https://codesandbox.io/p/sandbox/awesome-snow-zf5cv9?file=%2Fpublic%2Findex.html%3A10%2C9

Steps to Reproduce the Bug or Issue

  1. Go to https://codesandbox.io/p/sandbox/awesome-snow-zf5cv9?file=%2Fpublic%2Findex.html%3A10%2C9
  2. Resize the one of box, you can see the issues

Expected behavior

as normal

react-grid-layout library version

react-grid-layout@1.4.4

Operating System Version

macos

Browser

Chrome

Additional context

No response

Screenshots or Videos

No response

Activity

  1. STRML commented on Aug 4, 2026

    @STRML
    Collaborator

    This was generated by AI during triage.

    — RTL resize: shrink makes it bigger

    Triage Notes

    What we've established so far:

    • v2 has no first-party RTL support. The resize math in calcGridItemPosition and position.ts is LTR-only; nothing honors dir="rtl" or the direction attribute.
    • "RTL" here is likely container-level mirroring (dir attribute or transform: scaleX(-1)) that inverts mouse deltas, which breaks all coordinate math.

    What we still need from you (@TokeyJerry):

    • What exactly is "RTL" in your setup - a dir="rtl" / direction: rtl attribute, or your own mirroring?
    • Does the inverted shrink reproduce on v2.2.4 with explicit directional handles (resizeHandles={["e"]} / ["w"]) instead of mirroring?
    • If you use CSS scaleX(-1) mirroring, can you test without it?
  2. added
    needs-infoWaiting on reporter for more information
    on Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugneeds-infoWaiting on reporter for more information

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions