0

i have this input :

<input id="fraisent" name="fraisent" value="#= tauxAcquisEntree #" max="4" class="form-control text-center /*arrow-modify*/" min="1" type="number" step=1 pattern="[0-9]$" autocomplete="off" onkeydown="return false" />

It's already only modifiable by arrows.I want to go further and make it only clickable on the arrows, meaning making the part of the input where the number is displayed unclickable by mouse, only the arrows are clickable by mouse.

epascarello
  • 204,599
  • 20
  • 195
  • 236
Youssef Boudaya
  • 887
  • 2
  • 17
  • 29

1 Answers1

0

Again this is killing accessibility for people who don't use a mouse, but you can kill the focus of the input.

<input id="fraisent" name="fraisent" value="#= tauxAcquisEntree #" max="4" class="form-control text-center /*arrow-modify*/" min="1" type="number" step=1 pattern="[0-9]$" autocomplete="off" onkeydown="return false" onfocus="this.blur()" />
epascarello
  • 204,599
  • 20
  • 195
  • 236
  • for this specific situation that's exactly what i want , your solution helped me but not 100% , i want only the arrows to be clickable howerver for part that contains the number i want to act like it's disabled without having the whole input disabled – Youssef Boudaya Jun 30 '23 at 16:40
  • In chrome clicking does not do anything unless you click on the arrows. Duplicate has a lot of answers so look at those to see if they are better. Still not sure why you are not just building your own control at this point. – epascarello Jun 30 '23 at 16:42