Opened 12 years ago

Closed 5 years ago

#8679 closed enhancement (patchwelcome)

Dialog's "_position" should utilize position fixed

Reported by: Liquidrums Owned by:
Priority: low Milestone: 1.13
Component: Dijit Version: 1.3.0b1
Keywords: dojox lightbox position fixed Cc: [email protected]
Blocked By: Blocking:


I was viewing tests for dojox.image.Lightbox to see why there was flickering when scrolling in the browser. This can be remedied by doing the following:

In IE6, keep the current implementation.

In all other browsers (which support "position: fixed"), style the overlay as: "position: fixed; top: 0; left: 0; width: 100%; height: 100%;".

As the domNode is moved to the center of the viewport via _position, this would only need to happen once (instead of onScroll) if it used "position: fixed".

This enhancement can either affect only Lightbox, or Dialog (since it is called via this.inherited).

If you're interested, I can submit a patch.

Change History (9)

comment:1 Changed 12 years ago by dante

Milestone: tbdfuture
Status: newassigned

I'd love a patch. I've been meaning to look into this myself. This would be easy(est) for Lightbox, but would break down with dijit.Dialog and dojox.widget.Dialog because of dnd. DnD does not treat a "position:fixed" node properly (last I tried). If DnD could differentiate position:fixed vs absolute vs IE vs everyone else, Dialog's performance could be greatly improved.

I'm going to mark this as future for now, as we should likely be investigating how to make Dialog use position:fixed where available anyway, but not sure the possibility of me dedicating any time to it before 1.4 (at best)

comment:2 Changed 11 years ago by bill

Component: DojoX WidgetsDijit

Marking as dijit since presumably that's where the fix would be (but would affect LightBox too).

comment:3 Changed 10 years ago by dante

Milestone: future2.0
Priority: normallow

we should consider this for 2.0, low priority. we can use position:fixed in basically every browser except ie6 (though feature-detection as part of 2.0 would make it moot, too) ... you can set postion:fixed; top/left:...; safely for the behavior of Dialog already. make _postion update top/left, and detect if you need the connection for onscroll/onresize to call it.

comment:4 Changed 8 years ago by darth

Even the Dialog's underlay should use position fixed along with the dialog.

Trying to use a Dialog on a tablet device is too heavyweight. Specially when all this re-positioning code kicks in as the tablet keyboard pops in and pops out. Position fixed is lot more optimal. A nice simpler dialog example is the one in bootstrap.js

Last edited 8 years ago by darth (previous) (diff)

comment:5 Changed 8 years ago by darth

Likewise Mover.js onFirstMove() should account for position fixed too.

comment:6 Changed 7 years ago by bill

Milestone: 2.01.10

Might as well check this into SVN and then merge to github, so it's available for the 1.x and 2.x streams.

comment:7 Changed 6 years ago by cjolif

Is someone going to work on that one for 1.10? If not I suggest this is time to move it back to 2.0 (or 1.11)

comment:8 Changed 6 years ago by bill

Milestone: 1.102.0
Owner: dante deleted
Status: assignedopen

comment:9 Changed 5 years ago by dylan

Milestone: 2.01.12
Resolution: patchwelcome
Status: openclosed

Given that no one has shown interest in creating a patch in the past 5+ years, I'm closing this as patchwelcome.

Note: See TracTickets for help on using tickets.