-
17 Jan 2013 5:12 PM #1
Button.setToolTip(null) behaviour
Button.setToolTip(null) behaviour
In ExtJs 3.x calling setToolTip(null) would remove the previous tooltip attached to the button. In ExtJs 4 the tooltip displays the string null, and the empty string makes the tooltip disappear.
Is it normal? This occurs in 4.1.1 & 4.2 latest beta
null_tooltip.png
ThanksCode:Ext.define('MyApp.view.MyPanel', { extend: 'Ext.panel.Panel', height: 250, width: 400, title: 'My Panel', initComponent: function() { var me = this; Ext.applyIf(me, { dockedItems: [ { xtype: 'toolbar', dock: 'top', items: [ { xtype: 'button', text: 'Button with null tooltip - click on me', tooltip: 'I have a tooltip', listeners: { click: { fn: me.onButtonClick, scope: me } } }, { xtype: 'button', text: 'Button with empty string tooltip', tooltip: '' } ] } ] }); me.callParent(arguments); }, onButtonClick: function(button, e, options) { alert('setting the tooltip to null'); button.setTooltip(null); } });
You found a bug! We've classified it as
EXTJSIV-8263
.
We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.


Reply With Quote