import Vue from 'vue'

Vue.directive('iosfit', {
  inserted: function (el) {
    el.addEventListener('focus', (e)=> {
    	setTimeout(() => {
        e.target.scrollIntoView();
      },300)
    })
    el.addEventListener('blur', (e)=> {
    	document.body.scrollTop = 0
    })
  }
})