FormOverlay centers overlay off the page

Bug #596113 reported by Edwin Grubbs
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
High
Unassigned

Bug Description

FormOverlay calls centered() whenever a visibleChange event occurs. This causes overlays that are taller than the viewport to be positioned where the top of the overlay is off the page. The simplest solution is to check whether bounding_box.get('offsetTop') is less than zero and then set it with bounding_box.setStyle('top', X).

Another solution would be to use widget.align(null, [WidgetPostionExt.TC, WidgetPositionExt.TC]) instead of widget.centered(), but if the window was really big, the form overlay would pop up a long way from where the cursor clicked to activate it.

Instead of centering the widget vertically, it would be convenient to position the top of the widget near the element that was clicked on to show the widget.

Tags: javascript
Paul Hummer (rockstar)
Changed in lazr-js:
status: New → Triaged
importance: Undecided → Medium
affects: lazr-js → launchpad
Changed in launchpad:
importance: Medium → High
tags: added: javascript
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.