iFrame in jQuery UI dialog causes horizontal scrollbar on parent

前端 未结 4 1177
囚心锁ツ
囚心锁ツ 2021-02-06 19:34

I\'m using the jQuery UI dialog to present content in a new iFrame. Everything works out great except that the parent window of the dialog is getting a horizontal scrollbar whi

4条回答
  •  一生所求
    2021-02-06 20:11

    This seems to be a small bug in jQuery UI 1.7.2 and there is currently an open ticket (#3623) on the issue. Two solutions are proposed in the ticket comments:

    Solution A

    Modify jquery-ui-1.7.2.custom.css:

    1. Find .ui-widget-overlay.
    2. Add the following rule: position:fixed;.

    Solution B

    Modify jquery-ui-1.7.2.custom.min.js:

    1. Find addClass("ui-widget-overlay").css({width:this.width(),height:this.height()}); on line 97.
    2. Delete .css({width:this.width(),height:this.height()}).

提交回复
热议问题