Skip to content

Improper use of scrollLeft and scrollRight in resetTriggers in non-default writing modes #61

Description

@fred-wang

cc @cathiechen

The resetTriggers function sets the scrollLeft/scrollTop properties of the expand/contract children of the resize-triggers div to a non-negative value.

However, this is incorrect in some non-default writing modes where scrollLeft/scrollTop must be non-positive. See https://people.igalia.com/fwang/scrollable-elements-in-non-default-writing-modes/ ; Chrome is going to change to use the standard behavior https://www.chromestatus.com/feature/5759578031521792

I'm not really sure how this polyfill for ResizeObserver is working, but a possible fix would be to force "direction: ltr; writing-mode: horizontal-tb;" on the expand/contract div. Or check the actual CSS direction/writing-mode to determine whether to use positive/negative values.

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions