Opened 10 years ago

Closed 10 years ago

#14436 closed defect (fixed)

Dialog _singleChild code handles sizing improperly

Reported by: Karl Tiedt Owned by: bill
Priority: high Milestone: 1.8
Component: Dijit Version: 1.7.0
Keywords: dijit _singleChild style Cc:
Blocked By: Blocking:


Line # 242 of Dialog.js checks for singleChild state and then does a truthy check... which happens to fail if the previous value was "" which is a perfectly valid CSS string

So if _singleChildOriginalStyle = "" and the current style was set to "width: 700px" that width will never get removed despite attempting to reset the value to "" since if (this._singleChildOriginalStyle) is false for values of ""

if (typeof this._singleChildOrginalStyle != "undefined")

fixes this problem

Shouldnt we be avoiding unsafe comparisons like this when values arent booleans?

Change History (4)

comment:1 Changed 10 years ago by bill

Looks like you are right. I prefer the

"_singleChildOriginalStyle" in this

check, although it amounts to the same thing.

comment:2 Changed 10 years ago by bill

Milestone: 1.8
Owner: set to bill
Status: newassigned

comment:3 Changed 10 years ago by bill

Hmm, needs some more looking, after the change you suggested, in test_Dialog.html:

  1. click "show TabContainer dialog"
  2. shrink screen until TabContainer also shrunk
  3. enlarge screen
  4. TabContainer stays scrunched

comment:4 Changed 10 years ago by bill

Resolution: fixed
Status: assignedclosed

In [27363]:

Fix restore of Dialog to original size (when there's enough viewport space to display it at original size), fixes #14436 !strict.

Note: See TracTickets for help on using tickets.