#15628 closed defect (fixed)
dojox.mobile.SimpleDialog: show() should call resize()
Reported by: | Eric Durocher | Owned by: | Adrian Vasiliu |
---|---|---|---|
Priority: | undecided | Milestone: | 1.9.2 |
Component: | DojoX Mobile | Version: | 1.8.0 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
If a SimpleDialog? contains a ScrollablePane? with roundCornerMask=true, the mask will not be correctly updated when the dialog is shown. The same problem may happen with other widgets whole layout depend on the visibility. A solution is to call this.resize() in the show() method of SimpleDialog?.
Attachments (1)
Change History (12)
Changed 7 years ago by
Attachment: | dialog.htm added |
---|
comment:1 Changed 7 years ago by
Additional info from original reporter:
I ended up having to call resize twice. Calling resize after show allowed the content to be displayed and it als set the dialog box to the correct size. I had not noticed that it was incorrect. However, after the resize the smaller dialog is no longer centered on the page. This seems make things work correctly:
dialog.resize(); size the dialog correctly dialog.show(); show the dialog dialog.resize(); get the content to show
[can be reproduced with the attached sample, by modifying the #scroller CSS rule with height: 200px. Not sure there is really a problem with SimpleDialog here, since the sizes of the scroller are not consistent (CSS height = 200, attribute height = 400). To investigate whether we can handle this case better)
comment:2 Changed 7 years ago by
Owner: | changed from Eric Durocher to Patrick Ruzand |
---|---|
Status: | new → assigned |
comment:3 Changed 6 years ago by
For some reason, while I get an empty dialog using the attached test in 1.8.0, this is not the case with 1.9.0 anymore.
However, on the other side, having SimpleDialog?'s show() calling resize() is also helpful when the SimpleDialog? contains widgets such as SpinWheel? which layout needs to be redone once they are made visible. Since #16996, SpinWheel? and SpinWheelSlot? have a resize() method, and getting it called automatically by SimpleDialog?.show() is handy. Currently, the missing call of resize() hurts in dojox/mobile/test_SimpleDialog-spinWheel.html, which works it around by an explicit call of resize().
All in one, the addition of a resize() call in SimpleDialog?.show() appears to still be helpful in the current state of the code (1.9.x).
comment:4 Changed 6 years ago by
Version: | 1.7.3 → 1.8.0 |
---|
comment:5 Changed 6 years ago by
(Changed version from 1.7.3 to 1.8.0 because SimpleDialog? didn't exist in 1.7, and I do reproduce the issue with the attached test in 1.8.0)
comment:6 Changed 6 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:8 Changed 6 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:9 Changed 6 years ago by
Owner: | changed from Patrick Ruzand to Adrian Vasiliu |
---|---|
Status: | reopened → assigned |
comment:10 Changed 6 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:11 Changed 6 years ago by
Milestone: | tbd → 1.9.2 |
---|
Sample file that reproduces the problem (on Chrome or iPhone), uncomment the resize() to workaround the problem.