mirror of
https://github.com/flarum/framework.git
synced 2024-11-23 13:30:47 +08:00
Focus at the end of the textarea when showing composer
This commit is contained in:
parent
a8d762abff
commit
9328277961
|
@ -33,7 +33,11 @@ export default class ComposerBody extends Component {
|
|||
}
|
||||
|
||||
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() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user