Opened 11 years ago

Closed 11 years ago

#9080 closed defect (fixed)

Lightbox and Dialog have odd residual layout artifact

Reported by: dante Owned by: bill
Priority: high Milestone: 1.4
Component: Dijit Version: 1.3.0
Keywords: Cc:
Blocked By: Blocking:

Description

If you open test_Lightbox.html, open the "larger than viewport" (or actually any of them) lightbox, then close it -- if you resize the browser to be smaller than the right or bottom coords of the dialog before closing, you see a window-level scrollbar. This was reportd in #9073 with other items, but should have it's own ticket.

Attachments (1)

Dialog.patch (370 bytes) - added by dante 11 years ago.
my fix. bill said something about contentpane and changing how dialog is hidden again. this seems easier.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 11 years ago by dante

Component: DojoxDijit

k figured it out, this is Dialog's issue. from irc:

[10:42a] phiggins:
I found the reason, and know how to fix but wanted to run by you
[10:42a] phiggins:
(it is in dijit.Dialog)
[10:42a] phiggins:
in Dialog's postCreate, it sets the node offscreen by top:-9999px only
[10:43a] phiggins:
so it is still 'centered' in the screen
[10:43a] phiggins:
then if you resize too small, it's still top:-9999 but it's left/right are unchanged, causing scrollbars
[10:43a] phiggins:
something like var prop = this.isLtr ? "left" : "right"; style[prop] = "-999px" would fix
[10:44a] phiggins:
visibility:hidden preserves layout, hence the scrollbars

Changed 11 years ago by dante

Attachment: Dialog.patch added

my fix. bill said something about contentpane and changing how dialog is hidden again. this seems easier.

comment:2 Changed 11 years ago by bill

Right, I think now that ContentPane calls resize() on it's "children" when it's shown, that we could just hide it via display:none.

That was the trend in 0.3 (TabContainer etc. uses display:none) but I didn't bother changing it for Dialog or the dijit.popup code. IIRC there wasn't a good reason *not* to, I just left it because it was working (except for this new problem). Although, it would expose issues for widgets inside a Dialog that misbehave and try to do layout on initialization rather than waiting for a resize() call.

comment:3 Changed 11 years ago by Eugene Lazutkin

Summary: Lighbox (perhaps Dialog) has odd residual layout artifactLightbox (perhaps Dialog) has odd residual layout artifact

comment:4 Changed 11 years ago by bill

Owner: changed from dante to bill
Status: newassigned

comment:5 Changed 11 years ago by bill

Resolution: fixed
Status: assignedclosed
Summary: Lightbox (perhaps Dialog) has odd residual layout artifactLightbox and Dialog have odd residual layout artifact

Fixed in [17256].

Note: See TracTickets for help on using tickets.