mirror of
https://github.com/discourse/discourse.git
synced 2025-01-19 10:22:45 +08:00
FIX: Firefox wasn't focusing on d-editor
This commit is contained in:
parent
40c8d39137
commit
83be335c54
|
@ -318,6 +318,9 @@ export default Ember.Component.extend({
|
|||
_selectText(from, length) {
|
||||
Ember.run.scheduleOnce('afterRender', () => {
|
||||
const textarea = this.$('textarea.d-editor-input')[0];
|
||||
if (!this.capabilities.isIOS) {
|
||||
textarea.focus();
|
||||
}
|
||||
textarea.selectionStart = from;
|
||||
textarea.selectionEnd = textarea.selectionStart + length;
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user