Bug Tracker

Opened 7 years ago

Closed 7 years ago

#12992 closed bug (notabug)

UI dialog bug for browser.msie

Reported by: yarshevich@… Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.8.2
Keywords: Cc:
Blocked by: Blocking:

Description

$.widget("ui.dialog", {

version: "1.9.1", options: {

autoOpen: true, buttons: {}, closeOnEscape: true, closeText: "close", dialogClass: "", draggable: true, hide: null, height: "auto", maxHeight: false, maxWidth: false, minHeight: 150, minWidth: 150, modal: false, position: {

my: "center", at: "center", of: window, collision: "fit", ensure that the titlebar is never outside the document using: function( pos ) {

if (!jQuery.browser.msie) {

var topOffset = $( this ).css( pos ).offset().top; if ( topOffset < 0 ) {

$( this ).css( "top", pos.top - topOffset );

}

}

}

}, resizable: true, show: null, stack: true, title: "", width: 300, zIndex: 1000

},

_create: function() {

this.originalTitle = this.element.attr( "title" ); #5742 - .attr() might return a DOMElement if ( typeof this.originalTitle !== "string" ) {

this.originalTitle = "";

} this.oldPosition = {

parent: this.element.parent(), index: this.element.parent().children().index( this.element )

};

this.options.title = this.options.title
this.originalTitle;

var that = this,

options = this.options,

title = options.title
"&#160;",

uiDialog, uiDialogTitlebar, uiDialogTitlebarClose, uiDialogTitle, uiDialogButtonPane;

uiDialog = ( this.uiDialog = $( "<div>" ) )

.addClass( uiDialogClasses + options.dialogClass ) .css({

display: "none", outline: 0, TODO: move to stylesheet zIndex: options.zIndex

}) setting tabIndex makes the div focusable .attr( "tabIndex", -1) .keydown(function( event ) {

if ( options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode &&

event.keyCode === $.ui.keyCode.ESCAPE ) {

that.close( event ); event.preventDefault();

}

}) .mousedown(function( event ) {

that.moveToTop( false, event );

}) .appendTo( "body" );

this.element

.show() .removeAttr( "title" ) .addClass( "ui-dialog-content ui-widget-content" ) .appendTo( uiDialog );

uiDialogTitlebar = ( this.uiDialogTitlebar = $( "<div>" ) )

.addClass( "ui-dialog-titlebar ui-widget-header " +

"ui-corner-all ui-helper-clearfix" )

.bind( "mousedown", function() {

Dialog isn't getting focus when dragging (#8063) uiDialog.focus();

}) .prependTo( uiDialog );

if (jQuery.browser.msie) $(uiDialogTitlebar).css({ width: "100%"});

added two strings with 'jQuery.browser.msie'

Change History (1)

comment:1 Changed 7 years ago by scottgonzalez

Resolution: notabug
Status: newclosed

This is neither the correct place to report jQuery UI bugs, nor is it a bug report. If you'd like to actually describe the problem you're having, along with a reduced test case showing the problem, you can file a valid bug report at http://bugs.jqueryui.com/

If you have a proposed fix, you can file a pull request against http://github.com/jquery/jquery-ui/ but be aware that any proposal including $.browser will be closed without consideration.

Note: See TracTickets for help on using tickets.