PDA

View Full Version : Button tooltips don't honour the anchor attribute



Jangla
2 Oct 2013, 2:29 AM
The Button tooltip config attribute: http://docs.sencha.com/extjs/4.1.3/#!/api/Ext.button.Button-cfg-tooltip
...say that it can be a QuickTips config object.

The QuickTip definition: http://docs.sencha.com/extjs/4.1.3/#!/api/Ext.tip.QuickTip-cfg-anchor
...says it can accept an anchor attribute so you can anchor the tip to the button with a little check mark.

I'm looking to do this and to prevent mouse tracking so I can have a button with a tooltip that appears over the button with a nice little tick to point to the button.

Sounds simple, right?

Here's some example code:

http://jsfiddle.net/7BrvJ/

Anchor isn't respected when used this way. Am I missing something or is this a bug?

Jangla
7 Oct 2013, 4:44 AM
Shameless self-promoting bump :D

Ary_Fortune
7 Oct 2013, 5:05 AM
The scope of the tooltip goes beyond the present scope of the page.

Jangla
7 Oct 2013, 5:29 AM
The scope of the tooltip goes beyond the present scope of the page.
Sorry but I don't know what you mean. All I see is the docs stating one thing and the code not honouring it.

Ary_Fortune
7 Oct 2013, 9:56 AM
Do you just need a link inside the tool tip. Sorry but I dont get what u mean by "nice little tick to point to the button".

If you need anchor tag in tool tip, you can do something like this.

new Ext.ToolTip({
title: '<a href="#">Hello</a>',
id: 'content-anchor-tip',
target: 'leftCallout',
anchor: 'left',
html: null,
width: 415,
autoHide: false,
closable: true,
contentEl: 'content-tip'
});

Jangla
7 Oct 2013, 1:18 PM
No, I'm not talking about having an anchor tag in the tip itself. I'm talking about using the anchor attribute of the tooltip to fix the position of the tip on the button.

Check the docs I linked to and you should understand.