Skip to content

Unnecessary scroll bar when loading workspace comments #10416

Description

@nimeratus

Check for duplicates

  • I have searched for similar issues before opening a new one.

Description

When loading a workspace comment, if adding a scroll bar can make the text overflow, the scroll bar is added - even if the text wouldn't overflow if the scroll bar wasn't there.

Reproduction steps

  1. Go to https://raspberrypifoundation.github.io/blockly/packages/blockly/tests/playground.html
  2. Right click and press "Add Comment"
  3. Paste this into the comment:
    12345678 12345678
    12345678 12345678
    12345678 12345678
    12345678 12345678
    
  4. Resize the comment to be tightly around the text
  5. Press "Save JSON" (or "Save XML", but make sure that it doesn't add newlines and white spaces at the end of the comment as part of the XML formatting)
  6. Press "Load"
  7. The text wraps into more rows and shows a scroll bar. If you move the comment, the scroll bar disappears and the text unwraps

(the bug can also happen with word-wrapped English text where it re-wraps differently, but I think it will happen more reliably if the text is a pattern like this)

Priority

No response

Stack trace

Screenshots

comment-scroll-bar.webm

Browsers

Chrome desktop, Firefox desktop

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

    status: triageIssues awaiting triage by a Blockly team member

    Type

    Projects

    • Status
      Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions