Skip to content

Auto-scrolling flyout doesn't update "selected" category in category list #1900

@towerofnix

Description

@towerofnix

Expected Behavior

Auto-scrolling the flyout should make the "selected" category be updated in the category list.

Actual Behavior

The category list won't be updated until you manually scroll by some other means (mouse wheel, scrollbar, drag).

This is a somewhat similar issue to #1070.

Steps to Reproduce

Auto-scroll the flyout so that it becomes in a position where it would be considered to be in a different category/section than it was before the autoscroll. To actually do that in Scratch:

  1. Scroll so that the "Variables" section is highlighted grey.
  2. Click the "Make a Block" button, then confirm the new block.
  3. Note the category scrolls down to the "My Blocks" section, but the category list still says you're in the "Variables" section.
  4. Update the category list by scrolling manually (downwards, so that you don't position it back in the Variables section). Note that the category list now reflects you being in the "My Blocks" section.

Once you've created a custom block, this has a more noticeable effect if you edit a custom block:

  1. Make sure you've got a custom block created (i.e. so you can see the "define" block for it).
  2. Manually scroll to some category close to the start of the list, e.g. "Looks".
  3. Right-click the custom block definition and edit it, then confirm the dialog.
  4. Note that you are auto-scrolled to the "My Blocks" section, but the category list thinks you're still in "Looks" (or some other category). (This'll be changed in Editing a procedure should not scroll flyout #1856, but it's a good way to repro the issue here for now.)
  5. Scroll manually. The category list will update and show you're scrolled to the category you're actually scrolled to (My Blocks or Variables).

Operating System and Browser

Linux (Debian), Firefox 66.0b6.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions