Search and Top Navigation
#8741 closed bug (fixed)
Opened October 27, 2012 11:39AM UTC
Closed November 06, 2012 07:42PM UTC
Last modified May 24, 2014 12:12PM UTC
Dialog: dialog with position:fixed goes offscreen when opening after scrolling down since v 1.9.0
Reported by: | omuleanu | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.9.2 |
Component: | ui.dialog | Version: | 1.9.1 |
Keywords: | regression | Cc: | |
Blocked by: | Blocking: |
Description
this the jsfidlle link to see it ( if you have big screen make it smaller, you have to have scrollbars, so you would scroll down to the button that opens the dialog)
open with Chrome or IE9 (with Mozilla works ok)
Note that if you change to version 1.8.24 it will work ok
Attachments (0)
Change History (13)
Changed October 27, 2012 06:25PM UTC by comment:1
_comment0: | I found a fix for this: \ div.dialog({ \ ... \ // position: 'center', //setting here won't help \ }); \ \ //setting position to center this way after dialog was already defined helps \ div.dialog("option", "position", 'center'); → 1351362408244161 |
---|
Changed October 27, 2012 07:14PM UTC by comment:2
status: | new → open |
---|
Cleaned up the fiddle - http://jsfiddle.net/tj_vantoll/LZ9SR/. I can definitely see a difference between 1.8.24 & 1.9.1 but I can't put my finger on exactly what's going on.
Changed October 27, 2012 07:15PM UTC by comment:3
summary: | jQueryUI dialog with position:fixed goes offscreen when opening after scrolling down since v 1.9.0 → Dialog: dialog with position:fixed goes offscreen when opening after scrolling down since v 1.9.0 |
---|
Changed October 30, 2012 01:26PM UTC by comment:4
What's the motivation for setting position:fixed on the dialog?
Changed October 30, 2012 01:48PM UTC by comment:5
Forced visibility, it's a very common request.
Changed October 30, 2012 02:05PM UTC by comment:6
keywords: | → regression |
---|
Changed October 30, 2012 06:20PM UTC by comment:7
position:fixed makes the dialog to be position relative to the browser window instead of the page, for me it doesn't make sense to show a popup and scroll down/up and loose it, especially for modal dialogs
Changed November 06, 2012 07:40PM UTC by comment:8
This is caused by http://bugs.jquery.com/ticket/11671
There are two ways to fix this: Use jquery-git :-P or set top: 0; left: 0;
in your styles to avoid the bug.
Changed November 06, 2012 07:42PM UTC by comment:9
resolution: | → fixed |
---|---|
status: | open → closed |
Dialog: Set top and left properties in the default styles to avoid a bug in core. Fixes #8741 - Dialog: dialog with position:fixed goes offscreen when opening after scrolling down since v 1.9.0.
Changeset: 59865715fbec0462a0cc872195b44d3e3704a24b
Changed November 13, 2012 03:54PM UTC by comment:10
Dialog: Set top and left properties in the default styles to avoid a bug in core. Fixes #8741 - Dialog: dialog with position:fixed goes offscreen when opening after scrolling down since v 1.9.0.
Changeset: 78ad8e4891a612ed4060553274f1686b2a16dd5c
Changed November 13, 2012 03:54PM UTC by comment:11
milestone: | 1.10.0 → 1.9.2 |
---|
Changed May 24, 2014 09:45AM UTC by comment:12
Replying to [comment:10 Scott González]:
Dialog: Set top and left properties in the default styles to avoid a bug in core. Fixes #8741 - Dialog: dialog with position:fixed goes offscreen when opening after scrolling down since v 1.9.0. Changeset: 78ad8e4891a612ed4060553274f1686b2a16dd5c
I'm using 1.10.4 and it still not fixed.
How do you set left and top? Set on where?
It can't fix with set left top because when i drag that dialog still go off screen.
Maybe i set it wrong place?
<div id="modal-select-image" class="modal modal-media" title="Select image"></div><!--.modal--> <style> .modal-media { left: 0; top: 0; } /* << -- this does not fix anything. */ </style>
Changed May 24, 2014 12:12PM UTC by comment:13
Replying to [comment:12 vee]:
I'm using 1.10.4 and it still not fixed. How do you set left and top? Set on where? It can't fix with set left top because when i drag that dialog still go off screen. Maybe i set it wrong place?
You shouldn't be setting the position anywhere. It's already set in the CSS. What you're describing is a different bug entirely (offscreen during drag, not offscreen on open). See #9315. In the future, please do not comment on tickets that have been closed for over a year; file a new ticket with a reduced test case.
I found a fix for this: