Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#15091 closed enhancement (patchwelcome)

Add fixed position support to dijit.place

Reported by: DJ Mountney Owned by:
Priority: undecided Milestone: tbd
Component: Dijit Version: 1.7.2
Keywords: Cc:
Blocked By: Blocking:

Description

Zero out the view box top and left values in dijit.place when the node's position is fixed.

In addition, placeAroundNode should choose the proper flag to send to dojo.position when the node is position fixed, or potentially, dojo.position's default behaviour should change when it detects a node is position fixed.

Change History (3)

comment:1 Changed 7 years ago by bill

Resolution: patchwelcome
Status: newclosed

It's an interesting idea, although not too many uses since dijit/popup always creates a wrapper node around the popup node, and thus it doesn't matter if the popup node is position:fixed or not. Also, since position:fixed doesn't work old (older?) iOS's, or on older versions of IE, not sure how important it is to support.

If you have a simple patch to do this, including tests (and you have a CLA) I'd consider putting it in.

comment:2 Changed 7 years ago by DJ Mountney

We have patched our dojo 1.6.1 to do this. When dijit.popup.open adds classes to the wrapper, we also do a check if there is an aroundNode, and if the aroundNode is within a fixed position element (we have a convenience function that walks the offsetParent tree), if so, we make the wrapper fixed position. Likewise we have patched dijit.Menu to do this check when getting coords from a target.

The changes to dijit.place are simple, but I'm not really satisfied with how we make the wrapper fixed positioned, as it is only centralized if you have an aroundNode.

I will think on it, if I come up with what I think is a good solution, I will throw a patch in here.

comment:3 Changed 7 years ago by bill

OK thanks. Actually I didn't realize the issue was when the anchor node was position:fixed, I was just thinking of the popup node being position:fixed.

Note: See TracTickets for help on using tickets.