1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Issue: Mouse Wheel Up and Down changes the value in a field

Discussion in 'HTML & Website Design' started by fullylucky, Apr 12, 2020.

  1. #1
    hey I have a php website platform. On certain pages there's fields where user can enter values into. Critical amounts with 2 decimal points...

    I am finding if the mouse is in a certain positional and if the mouse wheel scrolls up or down it is able to change the value of the 2 decimal point amount!!!

    This is a big risk for data input.
    SEMrush
    Just wondering is there a way to disable or get rid of this for all users that visit the website?
     
    fullylucky, Apr 12, 2020 IP
    SEMrush
  2. hdewantara

    hdewantara Well-Known Member

    Messages:
    486
    Likes Received:
    45
    Best Answers:
    22
    Trophy Points:
    130
    #2
    FYI, it is normal for a focused <input> element of type "number" to behave like this.
    have an URL link to one of the pages where I could see this?
     
    hdewantara, Apr 12, 2020 IP
  3. fullylucky

    fullylucky Active Member

    Messages:
    39
    Likes Received:
    7
    Best Answers:
    1
    Trophy Points:
    58
    #3
    I have emailed you.
     
    fullylucky, Apr 12, 2020 IP
  4. hdewantara

    hdewantara Well-Known Member

    Messages:
    486
    Likes Received:
    45
    Best Answers:
    22
    Trophy Points:
    130
    #4
    Yes it is a number type input and seems to be acting its default behavior :)
    Ref: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/number

    Simple way is by changing its type from "number" to "text" I guess. But then your users won't be able to increase / decrease number with up / down keys.
     
    hdewantara, Apr 12, 2020 IP
  5. fullylucky

    fullylucky Active Member

    Messages:
    39
    Likes Received:
    7
    Best Answers:
    1
    Trophy Points:
    58
    #5
    ahhhh :'(

    Why do programmers or managers always wanna change the product. if someone is good and works don't "fix" it

    like I like windows 7. why change it looks bad windows 10. same with this.

    I never asked for this feature. who thought in their mind this was a needed feature of letting people scroll the mouse up and down. That's for scrolling the web page not the value within a field!! :'(
     
    fullylucky, Apr 12, 2020 IP
  6. hdewantara

    hdewantara Well-Known Member

    Messages:
    486
    Likes Received:
    45
    Best Answers:
    22
    Trophy Points:
    130
    #6
    this has history as far as I can remember.
    people asked for up / down feature for traditional text input and browsers answered with number type input.
    coders just need to adapt, haha :)
     
    hdewantara, Apr 12, 2020 IP