mirror of
https://github.com/flarum/core.git
synced 2025-08-08 01:16:52 +02:00
Fix SuperTextarea instantiation: provide a DOM element, not a jquery collection
This commit is contained in:
committed by
Franz Liedke
parent
f67194484b
commit
4c73d76668
@@ -50,7 +50,9 @@ export default class TextEditor extends Component {
|
||||
);
|
||||
}
|
||||
|
||||
oncreate() {
|
||||
oncreate(vnode) {
|
||||
super.oncreate(vnode);
|
||||
|
||||
const handler = () => {
|
||||
this.onsubmit();
|
||||
m.redraw();
|
||||
@@ -59,7 +61,7 @@ export default class TextEditor extends Component {
|
||||
this.$('textarea').bind('keydown', 'meta+return', handler);
|
||||
this.$('textarea').bind('keydown', 'ctrl+return', handler);
|
||||
|
||||
this.attrs.composer.editor = new SuperTextarea(this.$('textarea'));
|
||||
this.attrs.composer.editor = new SuperTextarea(this.$('textarea')[0]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user