mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-03 08:21:07 +00:00
Focus title input of task modal when shown (#10182)
This commit is contained in:
parent
10e0848a5c
commit
b1e5fcdeaf
1 changed files with 6 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
|||
<template lang="pug">
|
||||
form(v-if="task", @submit.stop.prevent="submit()")
|
||||
b-modal#task-modal(size="sm", @hidden="onClose()")
|
||||
b-modal#task-modal(size="sm", @hidden="onClose()", @shown="focusInput()")
|
||||
.task-modal-header(slot="modal-header", :class="cssClass('bg')")
|
||||
.clearfix
|
||||
h1.float-left {{ title }}
|
||||
|
|
@ -12,7 +12,8 @@
|
|||
input.form-control.title-input(
|
||||
type="text",
|
||||
required, v-model="task.text",
|
||||
autofocus, spellcheck="true",
|
||||
ref="inputToFocus",
|
||||
spellcheck="true",
|
||||
:disabled="groupAccessRequiredAndOnPersonalPage || challengeAccessRequired"
|
||||
)
|
||||
.form-group
|
||||
|
|
@ -963,6 +964,9 @@ export default {
|
|||
userId: memberId,
|
||||
});
|
||||
},
|
||||
focusInput () {
|
||||
this.$refs.inputToFocus.focus();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in a new issue