Ticket #3221 (closed bug: fixed)
dialog does not take padding into account when positioning the window
| Reported by: | wichert | Owned by: | rdworth |
|---|---|---|---|
| Priority: | minor | Milestone: | 1.7 |
| Component: | ui.dialog | Version: | 1.5.2 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
The problem is that position() uses the inner sizes, while it should be using the outer size. This is a patch:
Index: ui.dialog.js
===================================================================
--- ui.dialog.js (revision 2931)
+++ ui.dialog.js (working copy)
@@ -203,11 +203,11 @@
pLeft += 0;
break;
case 'right':
- pLeft += wnd.width() - this.uiDialog.width();
+ pLeft += wnd.width() - this.uiDialog.outerWidth();
break;
default:
case 'center':
- pLeft += (wnd.width() - this.uiDialog.width()) / 2;
+ pLeft += (wnd.width() - this.uiDialog.outerWidth()) / 2;
}
}
if (pos[1].constructor == Number) {
@@ -218,11 +218,11 @@
pTop += 0;
break;
case 'bottom':
- pTop += wnd.height() - this.uiDialog.height();
+ pTop += wnd.height() - this.uiDialog.outerHeight();
break;
default:
case 'middle':
- pTop += (wnd.height() - this.uiDialog.height()) / 2;
+ pTop += (wnd.height() - this.uiDialog.outerHeight()) / 2;
}
}
Change History
comment:1 Changed 5 years ago by scott.gonzalez
- Owner changed from scott.gonzalez to rdworth
- Status changed from new to assigned
comment:2 Changed 4 years ago by scott.gonzalez
- Status changed from assigned to closed
- Resolution set to fixed
- Milestone changed from TBD to 1.6
This doesn't seem to be a problem anymore. If you continue to have problems after 1.6rc3, feel free to re-open this ticket.
Note: See
TracTickets for help on using
tickets.

