FIX: Firefox wasn't focusing on d-editor

This commit is contained in:
Robin Ward 2015-12-04 12:13:50 -05:00
parent 40c8d39137
commit 83be335c54

View File

@ -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;
});