我有一个带有blur
事件监听器的文本字段。从另一个JS文件中,我在该文本字段上触发了blur()
,只有在CKEditor加载后才触发它。
win.editor.form.findField("title").blur();
以及其他文件
this.titleField = this.createField({
renderTo: comp.body.child('.ui-tfd-title'),
xtype: 'textfield',
name: 'title',
enableKeyEvents: true,
emptyText: "Enter title",
maxLength: 250,
autoCreate : {tag: 'input', type: 'text', maxlength: 250,
autocomplete: 'off'},
allowBlank: false ,
listeners: {
'blur': {
//some fn();
},
如果我一直停留在相同的浏览器选项卡上直到加载,它都可以正常工作。但是,如果在加载CKEditor之前切换浏览器选项卡或打开inspect,blur()
不会触发。但是,即使在选项卡更改后,CKEditor也可以完美加载。我不知道为什么会这样。