Skip to content

Modal's keep in bounds unexpected behaviour #20122

@martinowren

Description

@martinowren

Environment Information

  • Package version(s): 8.2.2
  • Browser and OS versions: Edge, Chrome, Firefox, MacOS, Windows. Tested on various versions of all OS'es and browsers.

Please provide a reproduction of the bug in a codepen:

I am not able to reproduce the bug in codepen. I will instead provide some code used to render the modal.

const getModalStyles = (
  data: PinnableTooltipData,
  hide: boolean
) => ({
  root: {
    display: hide ? "none" : "flex",
    alignItems: "start",
    justifyContent: "left",
  },
  main: {
    minHeight: 0,
    minWidth: 0,
    overflowY: "initial",
    top: data.tooltipAttributes.top,
    left: data.tooltipAttributes.left,
  },
});
<Modal
  isOpen={true}
  dragOptions={{
	    moveMenuItemText: "Move",
	    closeMenuItemText: "Close",
	    menu: ContextualMenu,
	    keepInBounds: true,
  }}
  isModeless={true}
  styles={getModalStyles(data, hide)}
>
	CONTENT
</>

Actual behavior:

The modal bounding is a lot smaller than the viewport.

Screen.Recording.2021-10-06.at.12.56.55.mov

Expected behavior:

The modal bounding box should fill the whole viewport.

Priorities and help requested:

Requested priority: Normal

Any help/advice in debugging would be greatly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions