2

I have an ASP.NET C# page, with image thumbnails in it.
I created a script that opens a jQuery UI Dialog on each hover on a thumbnail that shows me the thumbnail in larger size in a dialog view, and when I hover out - dialog closes.
My little annoying problem is, that in every mouseover (trigger dialog to open) - the page makes itself 'longer' - a scrollbar appears on the side of the browser, and it seems like the page gets longer when a dialog is openning, but it shouldn't do so.
When I hover off (mouseout) - the dialog disappears and the page returns to its normal state.
Because of this- when I hover through the thumbnails, my page 'jumps'.
I looked for a solution for this, and I've added return false; for each dialog open, and close - and it still doesn't make any different.
Sorry for the unperfect english, and thanks for all helpers!

geevee
  • 5,411
  • 5
  • 30
  • 48
  • I've had the same issue but hadn't gotten around to research and tackle the problem. My guess is that it could possibly be solved with a style change but, again, I haven't taken time to follow through on that idea. I'm eager to read answers to your question. – gurun8 May 17 '10 at 04:51

1 Answers1

3

I finally got my solution - for all interested:

open: function(event, ui){  
   /*  
    * Scrollbar fix   
    */  
   $('body').css('overflow','hidden');  
} 

I added this to dialog's opening event and it fixed the issue!

Igor
  • 33,276
  • 14
  • 79
  • 112
geevee
  • 5,411
  • 5
  • 30
  • 48