2013-01-24 32 views
0

我正在使用ExtJs 4.1.1。我有一個禁用的文本框。當我將鼠標移到文本框上時,我得到'Ext.fly爲空'JS錯誤。只有當該字段被禁用時,纔會發生這種情況。請幫忙。禁用文本字段拋出'Ext.fly爲空'錯誤當鼠標移動到文本字段上

Ext.onReady(function() { 
        Ext.create('Ext.window.Window', { 
         layout: 'anchor', 
         minHeight: 60, 
         items: [{ 
            xtype: 'textfield',     
            anchor: '100%', 
            disabled: true 
          }] 
        }).show(); 
       }); 
+0

請爲此提供一個小提琴,以便人們測試。 – Reimius

+0

我無法用Extjs 4.1.0 – Reimius

+0

重現此行爲請注意錯誤只能在IE中重現。以下是JSFiddle鏈接:http://jsfiddle.net/webfriend13/yZHnm/6/ – SharpCoder

回答

0

你對線7失蹤「」小語法錯誤,這可能是給你的錯誤,但我 無法重現你提到的錯誤。試試這個代碼,如果這可以修復你的問題

Ext.onReady(function() { 
      Ext.create('Ext.window.Window', { 
       layout: 'anchor', 
       minHeight: 60, 
       items: [{ 
          xtype: 'textfield',     
          anchor: '100%', 
          disabled: true 
        }] 
      }).show(); 
     }); 
+0

謝謝你的回覆。我確實在指定xtype config的時候錯過了',',但即使使用了','我仍然得到錯誤。確保文本字段已禁用,並將鼠標移到禁用的文本字段上方3-4次。我正在使用IE 8。 – SharpCoder