Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion demos/autocomplete/combobox.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
.autocomplete({
delay: 0,
minLength: 0,
source: $.proxy( this, "_source" )
source: this._source.bind( this )
})
.tooltip({
classes: {
Expand Down
8 changes: 7 additions & 1 deletion tests/lib/qunit-assert-domequal.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ domEqual.attributes = [
"title"
];

function camelCase( string ) {
return string.replace( /-([\da-z])/gi, function( all, letter ) {
return letter.toUpperCase();
} );
}

function getElementStyles( elem ) {
var styles = {};
var style = elem.ownerDocument.defaultView ?
Expand All @@ -71,7 +77,7 @@ function getElementStyles( elem ) {
while ( len-- ) {
key = style[ len ];
if ( typeof style[ key ] === "string" ) {
styles[ $.camelCase( key ) ] = style[ key ];
styles[ camelCase( key ) ] = style[ key ];
}
}

Expand Down
8 changes: 7 additions & 1 deletion ui/effect.js
Original file line number Diff line number Diff line change
Expand Up @@ -746,6 +746,12 @@ $.each(
}
);

function camelCase( string ) {
return string.replace( /-([\da-z])/gi, function( all, letter ) {
return letter.toUpperCase();
} );
}

function getElementStyles( elem ) {
var key, len,
style = elem.ownerDocument.defaultView ?
Expand All @@ -758,7 +764,7 @@ function getElementStyles( elem ) {
while ( len-- ) {
key = style[ len ];
if ( typeof style[ key ] === "string" ) {
styles[ $.camelCase( key ) ] = style[ key ];
styles[ camelCase( key ) ] = style[ key ];
}
}

Expand Down
4 changes: 2 additions & 2 deletions ui/widgets/autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ $.widget( "ui.autocomplete", {
_response: function() {
var index = ++this.requestIndex;

return $.proxy( function( content ) {
return function( content ) {
if ( index === this.requestIndex ) {
this.__response( content );
}
Expand All @@ -456,7 +456,7 @@ $.widget( "ui.autocomplete", {
if ( !this.pending ) {
this._removeClass( "ui-autocomplete-loading" );
}
}, this );
}.bind( this );
},

__response: function( content ) {
Expand Down