Ticket #5645 (closed feature: fixed)

Opened 3 years ago

Last modified 14 months ago

Position: Allow for arbitrary element to be containing element

Reported by: AzaToth Owned by:
Priority: blocker Milestone: 1.9.0
Component: ui.position Version: 1.8.2
Keywords: Cc:
Blocking: Blocked by:

Description

At the moment, the collision is only defined in relation to window. I think that any arbitrary containing element, possible limited to parent elements, should be able to be used as the container which collisions are calculated from.

Change History

comment:1 Changed 3 years ago by joern.zaefferer

  • Priority changed from minor to major
  • Type changed from enhancement to feature
  • Milestone changed from TBD to 1.next

This could be another option, called "within", with window as the default.

comment:2 Changed 2 years ago by gnarf

I just saw a pretty perfect use case for this while trying to help someone on #jQuery.

Lets say you have some wide content you want to position to the left/right of your hovered element, but you don't want this content to break outside of your current pages flow. If you could {within: '#contiainer', my: 'top left', at:'top right', collision:'flip'}

comment:3 Changed 2 years ago by scott.gonzalez

#6983 is a duplicate of this ticket.

comment:4 Changed 2 years ago by scott.gonzalez

  • Priority changed from major to blocker
  • Status changed from new to open
  • Milestone changed from 1.next to 1.9

comment:5 Changed 2 years ago by scott.gonzalez

  • Summary changed from position should allow for arbitary element to be containing element to Position: Allow for arbitrary element to be containing element

comment:7 Changed 23 months ago by joern.zaefferer

  • Status changed from open to closed
  • Resolution set to fixed

For some reason I never closed this ticket. Fixed by 433ed6eecf055eba327ced7e7c0ff0ce9b5fc304 /  https://github.com/jquery/jquery-ui/pull/254

comment:8 Changed 14 months ago by scott.gonzalez

#8190 is a duplicate of this ticket.

Note: See TracTickets for help on using tickets.