Scrollbar problem with jQuery UI dialog in Chrome and Safari

前端 未结 9 1407

I\'m using the jQuery UI dialog with modal=true. In Chrome and Safari, this disables scrolling via the scroll bar and cursor keys (scrolling with the mouse whee

9条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-08 04:33

    While I agree with, the folks in the party of not making a dialog that is bigger than the viewport, I think there are cases where scrolling may be necessary. A dialog might look very good in a resolution greater the 1024 x 768, but anything less looks crunched. Or say for instance you never want a dialog to show up over the header of your site. In my case I have ads that occassionally have flash z-index problems, so I never want dialogs to show above them. Finally, it is bad in general to take away any sort of common control, like scrolling, away from the user. This is a problem separate from how big the dialog is.

    I would be interested in knowing why the those mousedown and mouseup events are there in the first place.

    I tried the solution that alexis.kennedy provided and it works break without breaking anything that I can see in any browser.

提交回复
热议问题