-
Notifications
You must be signed in to change notification settings - Fork 5.3k
2nd Reopen - Suggested fix for #8740 #1053
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
f3204fe
0520a49
4996bb2
3306ec5
45a6e90
556559c
ebea3df
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,4 +54,46 @@ test( "focus events", function() { | |
element.trigger( "focusout" ); | ||
}); | ||
|
||
// http://bugs.jqueryui.com/ticket/8740 | ||
asyncTest( "content: async callback loses focus before load", function() { | ||
expect( 1 ); | ||
var element = $( "#tooltipped1" ).tooltip({ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Blank line between |
||
content: function( response ) { | ||
element.trigger( "mouseleave" ); | ||
setTimeout(function () { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No space between |
||
response( "sometext" ); | ||
setTimeout(function () { | ||
ok(!$( "#" + element.data( "ui-tooltip-id" ) ).is( ":visible" ), "Tooltip should not display" ); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This line exceeds the 100 character limit and is missing a space after |
||
start(); | ||
}); | ||
}); | ||
} | ||
}); | ||
element.trigger( "mouseover" ); | ||
element.tooltip( "destroy" ); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why are you destroying the tooltip before the test finishes? |
||
}); | ||
|
||
// https://github.com/jquery/jquery-ui/pull/992/files#r5667799 | ||
asyncTest( "content: close should only be called once, even if content is set multiple times", function() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think we actually need this test. |
||
expect( 1 ); | ||
var element = $( "#tooltipped1" ).tooltip(), | ||
closecount = 0; | ||
element.bind( "tooltipopen", function() { | ||
element.tooltip( "option", "content", "one" ); | ||
element.tooltip( "option", "content", "two" ); | ||
element.trigger( "mouseleave" ); | ||
}); | ||
element.bind( "tooltipclose", function() { | ||
closecount++; | ||
if (closecount === 1) { | ||
setTimeout(function () { | ||
equal( closecount, 1, "Close event handler should be called once" ); | ||
element.tooltip( "destroy" ); | ||
start(); | ||
}); | ||
} | ||
}); | ||
element.trigger( "mouseover" ); | ||
}); | ||
|
||
}( jQuery ) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test belongs in
tooltip_options.js
, it's not testing any events.