PDA

View Full Version : can't make button text unselectable



MichaelOstrovsky
1 Jul 2010, 7:19 AM
i'm trying to make text inside button unselectable in IE8. below is a part of button's extension:


onRender:function(){
var tpl;

if(!neo.Button.buttonTemplate){
neo.Button.buttonTemplate=new Ext.Template(
'<div id="{0}" class="neo-btn {1} {2}">',
'<div class="{1}-r"><div class="{1}-c">',
'<button></button>',
'</div></div>',
'</div>'
)
neo.Button.buttonTemplate.compile()
}
tpl=neo.Button.buttonTemplate;

this.template=tpl;

neo.Button.superclass.onRender.apply(this,arguments);

this.btnEl.unselectable();
},

it works ok for firefox, but not for IE8.

i also tried setting the whole button component el to unselectable;
tried putting 'span' inside buttonEl and making it unselectable;
and tried putting the ... unselectable="on" class="x-unselectable" ... directly inside the template. nothing helps.

please help :)