id="mytextarea"
テキストエリアを持つ新しいビューが表示されたときに、カーソルをテキストエリアに設定したいと思います。
.focus() が機能するはずですが、機能しません。なんで?
console.log('this message is displayed');//displayed in console
Ext.getCmp('mytextarea').focus();//nothing happens at the same time
そして、これは私がChromeに持っているものです:
<div class="x-container x-field-textarea x-field x-label-align-left x-form-label-nowrap x-empty" id="mytextarea">
<div class="x-form-label" id="ext-element-127" style="width: 30% !important;">
<span id="ext-element-128"></span>
</div>
<div class="x-component-outer" id="ext-element-126">
<div class="x-unsized x-field-input sencha-clear-icon" id="ext-textareainput-1">
<textarea id="ext-element-129" class="x-input-el x-form-field x-input-text" type="text" autocapitalize="off" placeholder="Type here...">
</textarea>
<div class="x-field-mask" id="ext-element-130" style="display: none !important;">
</div>
<div class="x-clear-icon" id="ext-element-131">
</div>
</div>
</div>
</div>
ありがとうございました。