mirror of
https://github.com/flarum/framework.git
synced 2024-12-12 14:13:37 +08:00
Focus at the end of the textarea when showing composer
This commit is contained in:
parent
222b81e917
commit
fb834675b9
|
@ -33,7 +33,11 @@ export default class ComposerBody extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
focus() {
|
focus() {
|
||||||
this.$().find(':input:enabled:visible:first').focus();
|
var $input = this.$().find(':input:enabled:visible:first');
|
||||||
|
if ($input.length) {
|
||||||
|
$input.focus();
|
||||||
|
$input[0].selectionStart = $input[0].selectionEnd = $input.val().length;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
preventExit() {
|
preventExit() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user