Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Dialog: Modified creation of overlay to bind events to the overlay rather than the document object. Fixed #4671 #230

Closed
wants to merge 1 commit into from

6 participants

@kborchers
Owner

Dialog: Modified creation of overlay to bind events to the overlay rather than the document object. Fixed #4671 - Modal Dialog disables vertical scroll bar in Chrome & Safari

@kborchers kborchers Dialog: Modified creation of overlay to bind events to the overlay ra…
…ther than the document object. Fixed #4671 - Modal Dialog disables vertical scroll bar in Chrome & Safari
3d42e1c
@scottgonzalez

This only applies to the first overlay and the context for this is wrong anyway since it's inside a setTimeout().

@PhoenixFnX

I think that this bug has to be solved.
As soon as you get dialogs with long content, there is NO WAY to see the bottom content without scrolling.

It works with a mouse wheel but laptop don't have mouse wheel.

@PhoenixFnX

On this page :
http://wiki.jqueryui.com/w/page/34725121/Visual-Test-Page-Cleanup

There is a workaround that unbind the binded event. This adds the following in the open: event of the dialog :
$("#longdialog").dialog({
modal:true,
open: function (event, ui) { window.setTimeout(function () {
jQuery(document).unbind('mousedown.dialog-overlay').unbind('mouseup.dialog-overlay'); }, 100);
}
});

This works ... but this is ugly

@jboesch

Is this being considered to be fixed? It's still a bug in the latest version.

@scottgonzalez

@jboesch The ticket is still open and this PR was closed without being merged.

@EdgarVerona

Why was this fork closed?

@filib

Why was this closed? It is still a bug.

@kborchers
Owner

The PR was closed because it was not the correct solution to the bug. The ticket is still open and has not been resolved. http://bugs.jqueryui.com/ticket/4671 Please feel free to submit a new solution to this issue.

@EdgarVerona

Ahh, good to know. Many thanks!

@p0ulpe p0ulpe referenced this pull request from a commit
@fnagel fnagel fixed: bug when using selectors like #one:two, improved replace for s…
…pecific selector chars, see #230, thx to @sirsimo
0f8f863
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 8, 2011
  1. @kborchers

    Dialog: Modified creation of overlay to bind events to the overlay ra…

    kborchers authored
    …ther than the document object. Fixed #4671 - Modal Dialog disables vertical scroll bar in Chrome & Safari
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  ui/jquery.ui.dialog.js
View
2  ui/jquery.ui.dialog.js
@@ -693,7 +693,7 @@ $.extend( $.ui.dialog.overlay, {
setTimeout(function() {
// handle $(el).dialog().dialog('close') (see #4065)
if ( $.ui.dialog.overlay.instances.length ) {
- $( document ).bind( $.ui.dialog.overlay.events, function( event ) {
+ this.bind( $.ui.dialog.overlay.events, function( event ) {
// stop events if the z-index of the target is < the z-index of the overlay
// we cannot return true when we don't want to cancel the event (#3523)
if ( $( event.target ).zIndex() < $.ui.dialog.overlay.maxZ ) {
Something went wrong with that request. Please try again.