I use jquery ui slider when I shift the slider, in the input field the value on which the slider is located, on the touch devices at this moment the keyboard opens, how to get rid of it? Demo link
- event.preventDefault () doesn't help? - Bim Bam
- @BimBam, if you add event.preventDefault (), the slider remains in one place but the keyboard opens - Vyacheslav Yashnikov
- And try to insert readonly = "true" into the input - Bim Bam
- @BimBam, yes it will solve the problem, but this attribute needs only to be added to the mobile, on the desktop version you need keyboard input - Vyacheslav Yashnikov
|
1 answer
I can offer a simple and lightweight solution. (Vue, Angular, React, etc - to your taste)
var app = new Vue({ el: '#app', data: { message: '50' } }) <script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.1.10/vue.min.js"></script> <div id='app'> <p>{{ message }} рублей</p> <input type=range v-model="message"> </div> - This can be done on jquery using the change trigger, it is actually implemented there, currently using the @BimBam offer, in which he advised you to add some complicated customization to von readonly + vue versus jquery Ui -
|