Skip to content

Resize handles render as div causes invalid HTML #720

@kWh61

Description

@kWh61

Overview of the problem

I'm using re-resizable version 6.9.0

My browser is: any

I am sure this issue is not a duplicate? Similar (but not exactly the same): #705

Description

The resize handlers (or "resizers") and their wrapper are defaulted to render as HTML "div" elements. If the resizable component is wrapped in an HTML "p" tag, it would cause Warning: validateDOMNesting(...): \<div> cannot appear as a descendant of \<p>.

Steps to Reproduce

Simply wrap the resizable component in an HTML "p" tag. I can't actually reproduce this issue in a code sandbox because for some reason it does not display a complete list of browser warnings and errors. My specific use case for this is that I want to build a resizable image component that can be inline.

Expected behavior

No warnings when I wrap the resizable component into a p tag.

Actual behavior

Such warnings occur.

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