문제

With new jQuery UI, when opening two dialog windows and triggering focus - the dialog which gets focus will be inserted before other dialogs.

I have made my own way of doing this with z-index, so I want to disable default one.

I have set up http://jsfiddle.net/2C7yG/ for you to see my problem. Here when I have iframe inside dialog, after reinserting - iframe gets reconstructed.

So it there any way to disable this behaviour?

I also want to link this issue which I think describes the same


Edit: I found http://jqueryui.com/upgrade-guide/1.10/#removed-stack-option

I found this but the ticket wont open


EDIT: Okay I found place which triggers this.

_moveToTop: function( event, silent ) {
        var moved = !!this.uiDialog.nextAll(":visible").insertBefore( this.uiDialog ).length;
        if ( moved && !silent ) {
            this._trigger( "focus", event );
        }
        return moved;
    },

This is a script which gets executed. Now I know that I can modify functions inside jQuery. how to extend this part with my own functionality?

도움이 되었습니까?

해결책

This is what I added to my scripts to disable this behaviour.

jQuery.ui.dialog.prototype._moveToTop = function(event, silent) {
    return true;
};
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top