标签:
在 ExtJS 5.1 中,使用 tabpanel,用 setActiveTab 来指定激活哪个 tab 的时候抱错:
Uncaught TypeError: c.isFocusable is not a function
这是 ExtJS 5.1 的一个 open issue。
加上如下代码
1 Ext.define(‘Override.ComponentQuery‘, { 2 override : ‘Ext.ComponentQuery‘ 3 }, function() { 4 5 Ext.apply(this.pseudos, { 6 7 focusable : function(cmps) { 8 var len = cmps.length, results = [], i = 0, c; 9 10 for (; i < len; i++) { 11 c = cmps[i]; 12 // If this is a generally focusable Component (has a focusEl, is 13 // rendered, enabled and visible) 14 // then it is currently focusable if focus management is enabled 15 // or if it is an input field, a button or a menu item 16 if (c.isFocusable && c.isFocusable()) { 17 // if (c.isFocusable()) { 18 results.push(c); 19 } 20 } 21 22 return results; 23 }, 24 25 }); 26 });
ExtJS 5.1 - tabpanel setActiveTab: Uncaught TypeError: c.isFocusable is not a function
标签:
原文地址:http://www.cnblogs.com/yuxiaoqi/p/5124093.html