framework7io / framework7-vue

Deprecated! Build full featured iOS & Android apps using Framework7 & Vue
http://framework7.io/vue/
MIT License
674 stars 151 forks source link

[v2] f7-range events not working #367

Closed lrbalt closed 6 years ago

lrbalt commented 6 years ago

(using 2.0.10)

I have changed default template for f7-vue. In form.vue I changed the slider into

<f7-range min="0" max="100" value="50" step="1" :label="true" @change="alert('change');" @click="alert('click');"></f7-range>

I can see in the vue developer plugin of chrome that the event is fired, but no alert is shown

nolimits4web commented 6 years ago

There is no change event in range component http://framework7.io/vue/range-slider.html#range-slider-events it must be @range:change="..."

nolimits4web commented 6 years ago

And there is no click event on range. You may use native click event then as @click.native="..."

lrbalt commented 6 years ago

I have changed the line into

<f7-range min="0" max="100" value="50" step="1" :label="true" @range:change="onRange"></f7-range>

and added

<script>
export default {
  methods: {
    onRange() {
      console.log("bla");
    }
  }
}
</script>

This works on Chromium, i.e. the console shows bla on changing the range. But on firefox, the range does not work. I cannot change the slider and it never calls onRange

Furthermore, when I use the range withing a f7-list-item as f7-input, the event is not fired, both on chromium and on firefox:

<f7-list class="innerlist" inset>
   <f7-list-item>
      <f7-input class="source-volume" type="range" min="0" max="100" step="1" @range:change="onRange">/f7-input>
   </f7-list-item>
</f7-list>