Skip to content
Snippets Groups Projects
Commit 06912bd6 authored by Adam Procter's avatar Adam Procter
Browse files

fixed onboard keyboard shortcuts

Now pressing enter also progresses straight to microcosm
parent eca6df37
No related branches found
No related tags found
No related merge requests found
...@@ -9,6 +9,7 @@ _14th March 2020_ ...@@ -9,6 +9,7 @@ _14th March 2020_
### Fixed ### Fixed
- Safari reload bug on initial creation of microcosms - Safari reload bug on initial creation of microcosms
- Pressing Enter allows quick onboard aswell, also no reload
# 0.1.5 # 0.1.5
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
>about</a> section. >about</a> section.
</p> </p>
<form v-show="parta"> <form v-show="parta" onsubmit="return false;">
<h2>1</h2> <h2>1</h2>
<h3>microcosm</h3> <h3>microcosm</h3>
<p> <p>
...@@ -26,11 +26,12 @@ ...@@ -26,11 +26,12 @@
autocorrect="off" autocorrect="off"
autocapitalize="none" autocapitalize="none"
autofocus autofocus
v-on:keyup.enter="createMicrocosm(), setFocus()"
/> />
<BaseButton buttonClass="onboard" @click="createMicrocosm(), setFocus()">+</BaseButton> <BaseButton buttonClass="onboard" @click="createMicrocosm(), setFocus()">+</BaseButton>
</form> </form>
<form v-show="partb"> <form v-show="partb" onsubmit="return false;">
<h2>2</h2> <h2>2</h2>
<h3>object</h3> <h3>object</h3>
<p> <p>
...@@ -44,11 +45,13 @@ ...@@ -44,11 +45,13 @@
autocorrect="off" autocorrect="off"
autocapitalize="none" autocapitalize="none"
ref="objectname" ref="objectname"
v-on:keyup.enter="setClient()"
/> />
<BaseButton buttonClass="onboard" @click="setClient()">+</BaseButton> <BaseButton buttonClass="onboard" @click="setClient(), setFocusTwo()">+</BaseButton>
</form> </form>
<form v-show="partc"> <form v-show="partc">
<input type="text" hidden v-on:keyup.enter="letsGo()" ref="objectnametwo" />
<h2>3</h2> <h2>3</h2>
<h3>start</h3> <h3>start</h3>
<BaseButton buttonClass="onboard" @click="letsGo()">+</BaseButton> <BaseButton buttonClass="onboard" @click="letsGo()">+</BaseButton>
...@@ -58,6 +61,7 @@ ...@@ -58,6 +61,7 @@
<script> <script>
var delay = 100 var delay = 100
var delaytwo = 100
export default { export default {
data: function() { data: function() {
...@@ -99,8 +103,14 @@ export default { ...@@ -99,8 +103,14 @@ export default {
setFocus() { setFocus() {
setTimeout(this.readyFocus, delay) setTimeout(this.readyFocus, delay)
}, },
setFocusTwo() {
setTimeout(this.readyFocusTwo, delaytwo)
},
readyFocus() { readyFocus() {
this.$refs.objectname.focus() this.$refs.objectname.focus()
},
readyFocusTwo() {
this.$refs.objectnametwo.focus()
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment