Skip to content

Question: How to scrollIntoView? #21

@vanniekerkalex

Description

@vanniekerkalex

Hi,

This is a question, not really an issue.

I have a div with a fixed size that allows the user to scroll / drag like a map. The map contains a floor plan with different rooms / elements. There are some rooms that will not be on-screen as they are scrolled / dragged out of view.

How can I have those elements be scrolled into view automatically when selected for say a dropdown list?

I have tried selectedElement.scrollIntoView(true), this works when view on a computer, but does not work on a mobile device.

I have also tried this method: http://jsfiddle.net/p3kar5bb/322/

Thanks in advance.

Br, Alex

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