Ticket #5531 (closed bug: fixed)
dialog width should be at least minWidth on creation
| Reported by: | zhaoz | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | 1.8.3 |
| Component: | ui.dialog | Version: | 1.8 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
Right now, when .dialog() is called, the minWidth is not respected until resize.
That is, if minwidth is 500px, and the width is 300px. The dialog would be created with a width of 300px instead of 500px. However, after resizing the minWidth applies.
Expected Behaivior:
- The dialog should never have a width of less than minWidth
- dialog should not be created with a width less than minwidth
Observed Behaivior:
- dialog on creation is created with a width less than minwidth, when (width < minwidth)
Attachments
Change History
Changed 3 years ago by zhaoz
-
attachment
jquery.dialog-minWidth_fix.patch
added
patch for minWidth issue
comment:2 Changed 3 years ago by zhaoz
This needs to be filed under ui.dialog... sorry. I don't think I have the ability to change it though.
comment:3 Changed 3 years ago by joern.zaefferer
- Priority changed from minor to major
- Component changed from ui.core to ui.dialog
We generally don't modify options, so that bounded value needs to be stored elsewhere. Otherwise valid.
comment:4 Changed 3 years ago by scott.gonzalez
- Milestone changed from TBD to 1.9
The width option is actually a "live" value, it gets updated during resizes in order to properly maintain state. So modifying it on create is okay. We'll also need to modify it if the minWidth is adjusted after create. Commented on commit as well.
comment:5 Changed 3 years ago by zhaoz
Fixed, rebased, and amended.
http://github.com/zhaoz/jquery-ui/commit/332e3fbe2b1bfd8f5d495d35b8388e8b90fa430f
I won't be updating the patch since github seems to be preferred.
comment:6 Changed 3 years ago by zhaoz
Just realized last fix still allows people to set width through options and bypass minWidth, will amend and resubmit.
comment:7 Changed 3 years ago by zhaoz
http://github.com/zhaoz/jquery-ui/commit/f05268ae91be6314e30a80d75ff16e3bfe605937
Fixed in _size instead of _setOption and _create
comment:8 Changed 3 years ago by zhaoz
Now testing for auto, unit tests included:
http://github.com/zhaoz/jquery-ui/commit/e8bd97802a08d4e96064ec9d7c5bd9dce460d95e
comment:9 Changed 3 years ago by scott.gonzalez
- Status changed from new to closed
- Resolution set to fixed
Fixed in c5770c0. Thanks zhaoz.
comment:11 Changed 2 years ago by Ziling Zhao
Dialog: modified so that minWidth is respected. Fixes #5531 - dialog width should be at least minWidth on creation.
Changeset: c5770c0e84b786ebe55a60034da0ff06dc02f422


I have a fix here: http://github.com/zhaoz/jquery-ui/commit/19388da8d7c50203a5a15dba063d5052346d3bb4
Unsure if that is an acceptable location for commits, will attach a patch as well.