PDA

View Full Version : [CLOSED][DUP][3.0.0] href="#" with onclick="return false"



uwolfer
12 Aug 2009, 5:11 AM
Ext version tested:

Ext 3.0.0


Adapter used:

ext


css used:

only default ext-all.css


Browser versions tested against:

Firefox 3.5
Chrome 3.0.98


Operating System:

Linux


Description:

Why do you set 'href="#"' for a elements with 'onclick="return false"'? That produces a statusbar message, which is not necessary at all. In Chrome it looks especially ugly since the statusbar does just show up if there is a text to display.


Test Case:

Create a TabPanel with a few tabs. When you hover the tabstripes, http://example.com/foo# shows up in the statusbar of the browser.


Steps to reproduce the problem:

see above


The result that was expected:

Do not show any text in the statusbar since it is not useful at all for the user.


The result that occurs instead:

see above


Debugging already done:

I have removed 'href="#"' from the TabPanel template. It seems to work fine in both Chrome and Firefox.


Possible fix:

Change for TabPanel (but do not forget all the other usages of this issue!):


var tt = new Ext.Template(
'<li class="{cls}" id="{id}"><a class="x-tab-strip-close" onclick="return false;"></a>',
'<a class="x-tab-right" href="#" onclick="return false;"><em class="x-tab-left">',
'<span class="x-tab-strip-inner"><span class="x-tab-strip-text {iconCls}">{text}</span></span>',
'</em></a></li>'
);

to:


var tt = new Ext.Template(
'<li class="{cls}" id="{id}"><a class="x-tab-strip-close" onclick="return false;"></a>',
'<a class="x-tab-right" onclick="return false;"><em class="x-tab-left">',
'<span class="x-tab-strip-inner"><span class="x-tab-strip-text {iconCls}">{text}</span></span>',
'</em></a></li>'
);

mjlecomte
15 Aug 2009, 3:00 PM
Is this same issue as suggested here?
http://extjs.com/forum/showthread.php?t=65396

uwolfer
18 Aug 2009, 3:37 AM
Yes, I think it's related to this one. But since it's closed, I think this one is still valid.

mjlecomte
19 Aug 2009, 3:41 AM
That thread is still OPEN. Closing this as DUP. You may want to subscribe to the other thread to monitor status.