Fixes. TODO: autofocus on forms, and understand why email autofill in name field
[vchess.git] / client / src / views / Variants.vue
index 3106115..3fccae5 100644 (file)
@@ -2,7 +2,11 @@
 main
   .row
     .col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2
-      input#prefixFilter(v-model="curPrefix" :placeholder="st.tr['Prefix?']")
+      input#prefixFilter(
+        v-model="curPrefix"
+        @input="setCurPrefix($event)"
+        :placeholder="st.tr['Prefix?']"
+      )
     .variant.col-sm-12.col-md-5.col-lg-4(
       v-for="(v,idx) in filteredVariants"
       :class="{'col-md-offset-1': idx%2==0, 'col-lg-offset-2': idx%2==0}"
@@ -44,6 +48,10 @@ export default {
     }
   },
   methods: {
+    // oninput listener, required for smartphones:
+    setCurPrefix: function(e) {
+      this.curPrefix = e.target.value;
+    },
     getLink: function(vname) {
       return "/variants/" + vname;
     }
@@ -52,10 +60,10 @@ export default {
 </script>
 
 <style lang="sass" scoped>
-// TODO: box-shadow or box-sizing ? https://stackoverflow.com/a/13517809
 input#prefixFilter
   display: block
   margin: 0 auto
+
 .variant
   box-sizing: border-box
   border: 1px solid brown