jQuery-UI-Dialog-extended icon indicating copy to clipboard operation
jQuery-UI-Dialog-extended copied to clipboard

Position not responding when window resize

Open timyounes opened this issue 9 years ago • 2 comments

Hi,

Why is it the position of dialog is not responding or not changing when I try to resize the window. When I load the dialog box its position is in the center and when I resize the window to smaller width the dialog box left margin or left indention is not changing position I assume that it will respond on window resize.

timyounes avatar Jan 30 '17 02:01 timyounes

I'll need more information to troubleshoot, as it sounds like you are experiencing a conflict or bug.

jasonday avatar Feb 02 '17 02:02 jasonday

I'm experiencing the same issue. It has to do with these lines:

// only recenter & add overflow if dialog has been resized if (elem.hasClass("resizedH") || elem.hasClass("resizedW")) { elem.dialog("option", "position", "center"); elem.css("overflow", "auto"); }

That is, the dialog is recentered only if it has been resized, which is not always the case when the window is resized. For example, if the window is being made bigger, or is not being made smaller than needed to resize the dialog, then the dialog is not recentered at all.

I understand that maybe the recentering should be done always, and not just when the dialog is resized.

By the way, it would be great to get it repositioned upon scroll as well, at least for modals, so that they cannot get out of view regardless of the user scrolling the page (I'm not sure if this behavior should be configured by means of a specific property).

ioliva avatar Mar 24 '17 10:03 ioliva