Skip to main content

Search and Top Navigation

#8747 closed bug (fixed)

Opened October 29, 2012 12:32PM UTC

Closed November 05, 2012 06:00PM UTC

Last modified November 08, 2012 10:56PM UTC

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>

Attachments (0)
Change History (5)

Changed October 29, 2012 03:41PM UTC by tj.vantoll comment:1

status: newopen
summary: Tooltip initialized with track: true upon dynamically loaded in a dialog causes javascript errorTooltip: Using the track option within dialogs creates JS errors

Confirmed and minified - http://jsfiddle.net/tj_vantoll/YaTEk/.

Appears to be just using the track option within a dialog.

Changed November 05, 2012 04:44PM UTC by jzaefferer comment:2

Probably caused by the dialog putting focus on the input when opening and tooltip missing the blur event or somthing like that.

Changed November 05, 2012 06:00PM UTC by Jörn Zaefferer comment:3

resolution: → fixed
status: openclosed

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

Changed November 08, 2012 10:56PM UTC by Jörn Zaefferer comment:4

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

Changed November 08, 2012 10:56PM UTC by scottgonzalez comment:5

milestone: 1.10.01.9.2