Search code examples
javascriptbuttonextjsextjs4href

ExtJs 4 - button's hrefTarget attribute doesn't works


I want make an ExtJs 4 button but the hredTarget attribute doesn't work. This is the button code:

tbar:[
            '->',
            {
                xtype:'button',
                text:'Logout',
                iconCls:'logout-icon',
                href:'logout',
                hrefTarget:'_self'
            }
        ]

And this is the generated html code:

    <div id="button-1026" class="x-btn x-box-item x-toolbar-item x-btn-default-toolbar-small x-icon-text-left x-btn-icon-text-left x-btn-default-toolbar-small-icon-text-left" style="margin: 0px; left: 1620px; top: 0px;">
        <em id="button-1026-btnWrap" class="">
            <a id="button-1026-btnEl" class="x-btn-center" role="button" target="_blank" href="logout">
               <span id="button-1026-btnInnerEl" class="x-btn-inner">Salir</span>
               <span id="button-1026-btnIconEl" class="x-btn-icon logout-icon"></span>
            </a>
         </em>
     </div>

Note that in the a component the target value is _blank when should be _self. How should I fix this issue?


Solution

  • It seams to be an issue on ExtJs 4.0. All works fine after updating the ExtJs version. Thanks everyone.