Opened 9 years ago

Closed 8 years ago

#3117 closed bug (fixed)

fix for autoResize in dialog with button pane

Reported by: mgl Owned by: rdworth
Priority: major Milestone: 1.7
Component: ui.dialog Version: 1.5.2
Keywords: dialog buttonpane resize autoresize Cc:
Blocked by: Blocking:


I already posted this in the jQuery UI google group, but I figured it might be better to create a proper ticket. Here's what I posted on google groups:

I've got a dialog working, and I notice now that autoResize seems to be working to make the div that is contained by my dialog fit to the inside of the dialog properly...very nice. However, the problem I've got now is that it doesn't account for the height of the button pane if it is visible, so if I'm using the button pane, I have to disable autoResize, and implement the same workaround I've been using with the resize event...'s my fix for the size method, which includes the button pane in the height calculation (starting at line 240):

size: function() {

var container = this.uiDialogContainer,

titlebar = this.uiDialogTitlebar, content = this.element, buttonpane = this.uiDialogButtonPane; tbMargin = parseInt(content.css('margin-top'),10) + parseInt(content.css('margin-bottom'),10), lrMargin = parseInt(content.css('margin-left'),10) + parseInt(content.css('margin-right'),10);

content.height(container.height() - titlebar.outerHeight() - buttonpane.outerHeight() - tbMargin); content.width(container.width() - lrMargin);


Change History (4)

comment:1 in reply to: ↑ description Changed 9 years ago by mgl

P.S.: This is with version 1.5.2, but that wasn't an option in this Trac.

comment:2 Changed 9 years ago by scottgonzalez

  • Owner changed from scott.gonzalez to rdworth
  • Status changed from new to assigned
  • Version changed from 1.5.1 to 1.5.2

comment:3 Changed 9 years ago by Cloudream

  • Milestone set to TDB

comment:4 Changed 8 years ago by scottgonzalez

  • Milestone changed from TBD to 1.6
  • Resolution set to fixed
  • Status changed from assigned to closed

The autoResize option was removed in r1177. Dialogs now always auto-resize.

Note: See TracTickets for help on using tickets.