Skip to content

Window constrain doesn't handle auto height #897

@johnstacy

Description

@johnstacy

I'm passing a really large x and y value os.ui.window.launch() to try to launch a window in the lower right corner for a window with height: auto. When the following code runs, it doesn't work as expected because the height of the window hasn't been calculated yet so h is only 38px. Not sure if there is a good way around this...

  if (y < winContainerTop) {
    this.element.css('top', winContainerTop + 'px');
  } else if ((y + h) > size.height) {
    y = Math.max(size.height - h, winContainerTop);
    this.element.css('top', y + 'px');
  }

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