jQWidgets Forums

jQuery UI Widgets Forums Editors NumberInput Spin buttons ignore readOnly setting?

This topic contains 3 replies, has 2 voices, and was last updated by  Peter Stoev 10 years, 9 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • Spin buttons ignore readOnly setting? #58947

    genachka
    Participant

    Seems like a bug in current release. I set readOnly to true, and while I can’t type values in the editbox, spinner still responds.

    Using your sample from documentation, I see this behavior: http://jsfiddle.net/jqwidgets/mw5yj/

    This is under Chrome 37.0.2062.94, not sure about others.

    Spin buttons ignore readOnly setting? #58967

    Peter Stoev
    Keymaster

    Hi genachka,

    readOnly disables only the Input field, not the Spin Buttons. If you want to disable the widget, use the “disabled” property.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    Spin buttons ignore readOnly setting? #58976

    genachka
    Participant

    Really? That’s expected behavior? That makes no sense! What’s the point of making the input field read-only if the spin buttons still can manipulate it? Which means that the value has changed in what was expected to be a readonly field and if it’s used in a CRUD operation it will potentially allow an update. If I have to make the widget disabled, then what good is the readonly property to me?

    Spin buttons ignore readOnly setting? #58977

    Peter Stoev
    Keymaster

    Hi genachka,

    Yes it is expected behavior. readonly and disabled are different things and work in a different way. In disabled state, the widget is disabled and you can’t edit or spin, in readonly mode, you can edit, but you can spin. This is by design and you have the option to use any of these features.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.