I have a vue ionic app and I have an ion-input in one of the view. When I focus into the input, the keyboard opens up and scrolls the view little upward. I don't want it to scroll upwards and wants it to be fixed where the view before focusing on the input. I'm using Vue 2 and ionic 5
This is my code
<template>
<ion-page>
<ion-content class="ion-padding" ref="content">
<ion-input maxlength="1" ref="nums"
autofocus="true"
class="num-input"
type="number"
v-on:keyup="added($event, index)"
@ionFocus="onKeyFocus"
v-for="index in 4" :key="index"></ion-input>
</ion-content>
</ion-page>
</template>
<script>
export default {
methods: {
onKeyFocus(){
this.$refs.content.style.overflow = 'hidden';
},
}
}
</script>
I tried using scrollAssist: false
too in main.js file
Vue.use(Ionic, { mode: 'ios', scrollAssist: false });