Skip to content

Commit

Permalink
fixup! Internal Submit-View
Browse files Browse the repository at this point in the history
  • Loading branch information
jotoeri committed Feb 24, 2021
1 parent 2eedc3d commit 171d43b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
9 changes: 9 additions & 0 deletions src/mixins/ViewsMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,15 @@ export default {
},

methods: {
/**
* Focus title after form load
*/
focusTitle() {
this.$nextTick(() => {
this.$refs.title.focus()
})
},

/**
* Fetch the full form data and update parent
*
Expand Down
9 changes: 0 additions & 9 deletions src/views/Create.vue
Original file line number Diff line number Diff line change
Expand Up @@ -243,15 +243,6 @@ export default {
},

methods: {
/**
* Focus title after form load
*/
focusTitle() {
this.$nextTick(() => {
this.$refs.title.focus()
})
},

/**
* Title & description save methods
*/
Expand Down
2 changes: 1 addition & 1 deletion src/views/Submit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<AppContent v-else>
<!-- Forms title & description-->
<header>
<h2 class="form-title">
<h2 ref="title" class="form-title">
{{ formTitle }}
</h2>
<!-- Do not wrap the following line between tags! `white-space:pre-line` respects `\n` but would produce additional empty first line -->
Expand Down

0 comments on commit 171d43b

Please sign in to comment.