Skip to main content

Search and Top Navigation

#5284 closed bug (fixed)

Opened March 05, 2010 02:04AM UTC

Closed October 26, 2011 02:46PM UTC

Position: Smarter collision detection

Reported by: scottgonzalez Owned by:
Priority: major Milestone: 1.9.0
Component: ui.position Version: 1.8
Keywords: Cc:
Blocked by: Blocking:

Collision detection needs to be smart enough to never make the situation worse. Flipping should only happen if more of the element will be visible after the flip. Fitting should only shift until the maximum possible amount of the element is visible.

Attachments (0)
Change History (8)

Changed March 21, 2010 03:58PM UTC by jzaefferer comment:1


We should create a testpage with four inputs, each in one corner, and position a menu based on the autocomplete-default for each input. Then you actually have to shrink the browser window to test, as position always does collision-detection against window - there is no way to specify a container against which to test.

Changed March 21, 2010 06:53PM UTC by jzaefferer comment:2

Changed July 30, 2010 09:39AM UTC by jzaefferer comment:3

Improved that testcase a bit further:

It shows quite nicely one of the problems we have:

The three menus on the right should be with the right corner on the inputs right corner.

Also: Setting collision: "fit" makes that test much worse. The bottom menus will actually end up overlapping their inputs.

Changed July 30, 2010 10:07AM UTC by jzaefferer comment:4

milestone: 1.next1.9
type: enhancementbug

Changed August 07, 2010 08:21PM UTC by bhollis comment:5

I fixed the problem with the "flip" collision that caused the menus on the right to not align correctly:

That commit also fixes a problem in the demo when you set both positions to "right bottom" then try to drag the orange element towards the top of the screen:

Changed October 19, 2010 03:39PM UTC by scottgonzalez comment:6

priority: criticalmajor

Changed August 16, 2011 08:36PM UTC by jzaefferer comment:7

Landed in master, needs some more testing to verify it covers everything we want.

Changed October 26, 2011 02:46PM UTC by scottgonzalez comment:8

resolution: → fixed
status: newclosed