mirror of
https://github.com/flarum/core.git
synced 2025-07-22 17:21:27 +02:00
Focus at the end of the textarea when showing composer
This commit is contained in:
@@ -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() {
|
||||||
|
Reference in New Issue
Block a user