mirror of
https://github.com/flarum/framework.git
synced 2024-12-12 06:03:39 +08:00
Make the invoker responsible for positioning the composer cursor
This commit is contained in:
parent
7232c51290
commit
25ca1135b2
|
@ -43,11 +43,7 @@ export default class ComposerBody extends Component {
|
|||
this.ready(true);
|
||||
m.redraw();
|
||||
|
||||
var $input = this.$().find(':input:enabled:visible:first');
|
||||
if ($input.length) {
|
||||
$input.focus();
|
||||
$input[0].selectionStart = $input[0].selectionEnd = $input.val().length;
|
||||
}
|
||||
this.$(':input:enabled:visible:first').focus();
|
||||
}
|
||||
|
||||
preventExit() {
|
||||
|
|
|
@ -133,7 +133,7 @@ class Composer extends Component {
|
|||
}
|
||||
|
||||
render(anchorToBottom) {
|
||||
if (this.position() === this.oldPosition) { return; }
|
||||
if (this.position() === this.oldPosition) { this.component.focus(); return; }
|
||||
|
||||
var $composer = this.$().stop(true);
|
||||
var oldHeight = $composer.is(':visible') ? $composer.outerHeight() : 0;
|
||||
|
|
Loading…
Reference in New Issue
Block a user