Ticket #5531 (closed bug: fixed)

Opened 4 years ago

Last modified 4 years ago

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

jquery.dialog-minWidth_fix.patch Download (399 bytes) - added by zhaoz 4 years ago.
patch for minWidth issue

Change History

comment:1 Changed 4 years ago by zhaoz

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.

Changed 4 years ago by zhaoz

patch for minWidth issue

comment:2 Changed 4 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 4 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 4 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 4 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 4 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 4 years ago by zhaoz

comment:8 Changed 4 years ago by zhaoz

comment:9 Changed 4 years ago by scott.gonzalez

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in  c5770c0. Thanks zhaoz.

comment:10 Changed 4 years ago by scott.gonzalez

  • Milestone changed from 1.9 to 1.8.3

comment:11 Changed 4 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

Note: See TracTickets for help on using tickets.