Threaded View
-
15 Jul 2011 10:57 AM #1
[4.0.2a, 4.0.1] ToolTip error with config { anchor: 'bottom', anchorToTarget: false}
[4.0.2a, 4.0.1] ToolTip error with config { anchor: 'bottom', anchorToTarget: false}
When using ToolTip with anchor(arrow pointing) on mouse pointer (without target), it throws an exception.
The code works on ExtJs 3.x
Test code:anchor : String
If specified, indicates that the tip should be anchored to a particular side of the target element or mouse pointer ("top", "right", "bottom", or "left"), with an arrow pointing back at the target or mouse pointer. If constrainPosition is enabled, this will be used as a preferred value only and may be flipped as needed.
Error message on Chrome 12 (failed on Firefox 3.6.18 as well):Code:var tip = Ext.create('Ext.tip.ToolTip', { html: 'Test ToolTip anchor....', autoHide: false, anchor: 'bottom', anchorToTarget: false }); tip.showAt(200, 100);
Code:- Uncaught TypeError: Cannot read property '0' of undefined
- Ext.define.getTargetXYext-all-debug.js:37744
- Ext.define.showext-all-debug.js:37973
- Ext.define.showAtext-all-debug.js:26945
- Base.callParentext-all-debug.js:2700
- Ext.define.showAtext-all-debug.js:37579
- Base.callParentext-all-debug.js:2700
- Ext.define.showAtext-all-debug.js:37992
- (anonymous function)test.js:192
- isEventext-all-debug.js:10138
- callext-all-debug.js:10094
Code:getTargetXY: function() { var me = this, mouseOffset; if (me.delegate) { me.anchorTarget = me.triggerElement; } if (me.anchor) { me.targetCounter++; var offsets = me.getOffsets(), xy = (me.anchorToTarget && !me.trackMouse) ? me.el.getAlignToXY(me.anchorTarget, me.getAnchorAlign()) : me.targetXY, dw = Ext.core.Element.getViewWidth() - 5, dh = Ext.core.Element.getViewHeight() - 5, de = document.documentElement, bd = document.body, scrollX = (de.scrollLeft || bd.scrollLeft || 0) + 5, scrollY = (de.scrollTop || bd.scrollTop || 0) + 5, axy = [xy[0] + offsets[0], xy[1] + offsets[1]], //xy is undefined sz = me.getSize(), constrainPosition = me.constrainPosition;
- Uncaught TypeError: Cannot read property '0' of undefined
Thank you for reporting this bug. We will make it our priority to review this report.


Reply With Quote