Skip to content

Calling show on a visible element modifies the display type to block, despite it being flex #647

@mfdewit

Description

@mfdewit

I encountered some unwanted behavior when using show/hide to filter a list of elements specifying display:flex.

When calling the correct sequence everything works OK. So calling hide first seems to register the original display type before setting display:none. Then after calling show, display:flex is restored.

Calling show on an element that is already visible causes the display type to change to block. And it never reverts to flex in my case. This causes undesired changes to the layout. Ideally this method should have no effect in this case.

I've worked around this to make sure show is never called on visible elements, but I think this should be default behavior.

PS. The docs state that show/hide switches between none and block. But this is obviously not the case since it also switches to flex.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions