Skip to content

hoo-checkbox not auto scrolled into view on focus #153

Description

@gabbsmo

Describe the bug
If you make a long list of checkboxes (e.g. a table grid with selectable rows), the checkboxes are focusable, but the scrollable parent element will not scroll them into view.

This issue seem to only apply when their is a inline scrollable parent element. Scrolling on the document level seem to work as expected.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://jsfiddle.net/7vg2tkfu/
  2. Click the textbox

Expected behavior
As with any focusable element, they should automatically be scrolled into view when they receive focus.

Desktop (please complete the following information):

  • OS: Windows
  • Browser: Edge
  • Version: 128

Additional context
My workaround:

.hoo-checkbox {
    position: unset; /* position: absolute; seem to be the culprit */
    display: block; /* To get rid of any whitespace */
    width: 0;
    height: 0;
    margin: 0;
}

Fiddle with workaround: https://jsfiddle.net/7vg2tkfu/1/

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions