Opened 7 years ago
Closed 7 years ago
#17667 closed defect (invalid)
dijit/Dialog _size method has several bugs triggered by viewport being smaller than dialog
Reported by: | drcoelho | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | tbd |
Component: | Dijit | Version: | 1.9.2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
The _size method of dijit/Dialog has the following bugs:
- it fails to adjust the size of the dialog properly, since it modifies the containerNode size and not the dialog domNode
- it fails to properly control the scrollbars, again because it modifies the containerNode, versus the dialog domNode
- it utilizes non-sensical math to calculate a dialog size which is smaller than the viewpoint, and produces negative numbers. These values are just ignored by most browsers making these calculations a no-op, but in IE8, these values cause the IE8 javascript to crash and the dialog show to fail.
- it sets position "relative" which causes the dialog to be misplaced
Attached is a modified version of _size which works properly providing a very elegant solutions which works nicely when the viewport is smaller than the dialog.
Please also reference ticket 17657 which was triggered by an initial discussion of this issue which I initiated on the community bbs. Ticket 17657 does not address the underlying bugs discussed in this ticket.
Attachments (1)
Change History (3)
Changed 7 years ago by
comment:1 Changed 7 years ago by
Fixed one additional bug as follows:
- the width/height should be adjusted independently
Updated the _size method patch.
comment:2 Changed 7 years ago by
Component: | General → Dijit |
---|---|
Resolution: | → invalid |
Status: | new → closed |
As I tried to explain in #17657, _size() intentionally modifies the containerNode size rather than the DOMNode. This is a not a bug, but intended behavior. The idea is to get a scrollbar inside the dialog chrome.
If you have a test case that demonstrates what you think is a problem, I can take a look. However, don't make a test case that sets a size on the Dialog domNode itself; as I explained in #17657 this is not allowed.
patched _size method