PDA

View Full Version : [OPEN] [FIXED-EXTJSIV-333] Quick Tips do no respect window boundries



James Goddard
25 Mar 2011, 6:30 AM
Hover over the button:


Ext.onReady (function () {
Ext.tip.QuickTips.init ();

Ext.create ('Ext.container.Viewport', {
layout: 'fit',
items: [{
dockedItems: [{
dock: 'top',
xtype: 'toolbar',
items: [ '->', {
xtype: 'button',
text: 'test',
tooltip: 'Test Button'
}]
}]
}]
});
});

Animal
27 Mar 2011, 9:22 AM
You do have to configure them with constrain: true

Tooltips have never constrained by default

Go to http://dev.sencha.com/deploy/dev/examples/simple-widgets/qtips.html

Shrink the window width to very narrow, and then hover over the "Mouse Track" item. The tooltip goes off the screen.

James Goddard
29 Mar 2011, 5:45 AM
This seems an odd default since I cannot imagine a scenario where someone would want a tool tip to be off screen. That aside it still doesn't work, whether setting it in the way the docs recommend or via the prototype:


Ext.onReady (function () {
Ext.tip.QuickTips.init ();
Ext.apply (Ext.tip.QuickTips.getQuickTip (), {
constrainPosition: true,
constrain: true
});
Ext.tip.QuickTip.prototype.constrainPosition = true;
Ext.tip.QuickTip.prototype.constrain = true;

Ext.create ('Ext.container.Viewport', {
layout: 'fit',
items: [{
dockedItems: [{
dock: 'top',
xtype: 'toolbar',
items: [ '->', {
xtype: 'button',
text: 'test',
tooltip: 'Test Button'
}]
}]
}]
});
});

Jamie Avins
29 Mar 2011, 8:34 AM
For the next release, the will constrain properly. By default...

James Goddard
1 Apr 2011, 11:08 AM
Confirmed fixed, thanks.