#8747 closed bug (fixed)
Tooltip: Using the track option within dialogs creates JS errors
Reported by: | wfsiew | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.9.2 |
Component: | ui.tooltip | Version: | 1.9.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
If there is a content where it is dynamically loaded from ajax into a dialog, and upon the load callback, when the tooltip in the dynamic content is initialized with option track: true, it will cause error in the javascript.
The example code is shown below :
main.html :
<div id="dialog-add" title="Add Form">
<div id="dialog_add_body"></div>
</div>
<input type="button" id="cmd" value="Open" />
javascript in main.html :
$(document).ready(function() {
var popup_dialog_opt = {
autoOpen : false, width : 350, resizable : false, draggable : true, modal : false, stack : true, zIndex : 1000
};
$('#dialog-add').dialog(popup_dialog_opt); $('#cmd').click(show_form);
});
function show_form() {
$('#dialog_add_body').load('form.html', function() {
$('#add-form').tooltip({track: true}); $('#dialog-add').dialog('open');
});
}
form.html :
<form id="add-form" method="post">
<input type="text" name="age" title="enter age" />
</form>
Change History (5)
comment:1 Changed 10 years ago by
Status: | new → open |
---|---|
Summary: | Tooltip initialized with track: true upon dynamically loaded in a dialog causes javascript error → Tooltip: Using the track option within dialogs creates JS errors |
comment:2 Changed 10 years ago by
Probably caused by the dialog putting focus on the input when opening and tooltip missing the blur event or somthing like that.
comment:3 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | open → closed |
Tooltip: Check type on event directly, preventing TypeError when programmatically moving focus to track-toolipped-input. Fixes #8747 - Tooltip: Using the track option within dialogs creates JS errors
Changeset: 98173a3d0ea8e2e6aeb19dda9b232cb65a0684e4
comment:4 Changed 10 years ago by
Tooltip: Check type on event directly, preventing TypeError when programmatically moving focus to track-toolipped-input. Fixes #8747 - Tooltip: Using the track option within dialogs creates JS errors (cherry picked from commit 98173a3d0ea8e2e6aeb19dda9b232cb65a0684e4)
Changeset: 241c10044d8dadf186a8c29113a954580a44dec8
comment:5 Changed 10 years ago by
Milestone: | 1.10.0 → 1.9.2 |
---|
Confirmed and minified - http://jsfiddle.net/tj_vantoll/YaTEk/.
Appears to be just using the track option within a dialog.