Auto-focus the post text box on new post
This commit is contained in:
parent
44d35c6ccb
commit
c943864edc
2 changed files with 3 additions and 2 deletions
|
|
@ -2,12 +2,13 @@ import { Controller } from "@hotwired/stimulus"
|
|||
import { showToast } from "../services/toast";
|
||||
|
||||
export default class PosteditController extends Controller {
|
||||
static targets = ['bodyTextEdit'];
|
||||
static values = {
|
||||
saveAction: String,
|
||||
};
|
||||
|
||||
connect() {
|
||||
console.log("connected");
|
||||
this.bodyTextEditTarget.focus();
|
||||
}
|
||||
|
||||
async save(ev) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue