Wrong position of the dialog #246

Closed
Zortaniac opened this Issue May 22, 2013 · 8 comments

Projects

None yet

5 participants

@Zortaniac

There seems to be an error in dialog.js.
If you scroll down the window and opens a dialog, the dialog runs out of the viewport.

The error seems to be in the positioning. You add the $(window).scrollTop() to the absolute position of the dialog. But the underlaying container of the dialog is position fixed, so there is no needing of adding the scroll top and the dialog runs out of the viewport.

@vabatta vabatta was assigned May 24, 2013
@muushfiqq

@vabatta So what would be solution ? I couldn't fix it !

@vabatta
vabatta commented May 25, 2013

Replace line 105 from dialog.js with the following and it should works.

$('#dialogBox').css("top", (params.position.offsetY)?(params.position.offsetY):(Math.max(0, (($(window).height() - $('#dialogBox').outerHeight()) / 3)) + "px"));
@muushfiqq

This is awesome !!!
Thanks !!!!

@romitzie

Hi,

I am trying to fix mine also but the code in line 105 from dialog.js is this:

$('#dialogBox div.header').css('cursor', 'move').on("mousedown", function(e) {

@vabatta
vabatta commented May 30, 2013

@romitzie You should update your metro ui copy with lastest one (use develop branch for more fixes). :D

@olton
Owner
olton commented May 30, 2013

Develop merged into master with all latest fixes.

Ñ óâàæåíèåì, Ñåðãåé Ïèìåíîâ
Þðèñò-êîíñóëüòàíò
Ðåãèñòðàòîð ua.alldomains

Îò: vabatta notifications@github.com
Îáðàòíûé àäðåñ: olton/Metro-UI-CSS
<reply+i-14622377-ccf52318a8edbaf580018fda50fc5ba50ba1cf09-365108@reply.gith
ub.com>
Äàòà: ÷åòâåðã, 30 ìàÿ 2013 ã., 20:34
Êîìó: olton/Metro-UI-CSS Metro-UI-CSS@noreply.github.com
Òåìà: Re: [Metro-UI-CSS] Wrong position of the dialog (#246)

@romitzie https://github.com/romitzie You should update your metro ui
copy with lastest one (use develop branch for more fixes). :D


Reply to this email directly or view it on GitHub
#246 (comment) .

@romitzie

Thanks Olton and Vabatta. I will update my files to the latest one.

@romitzie

Here it goes again. See my thread: #261
Is there something wrong with my code? Some of my site's functionality are not working when I uploaded the latest copy on the develop branch.

@olton olton closed this Apr 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment