pharo-spec / Spec

Spec is a framework in Pharo for describing user interfaces.
MIT License
62 stars 65 forks source link

Bug: The up and down buttons of a read-only number input allow changing the value #1574

Open koendehondt opened 4 months ago

koendehondt commented 4 months ago

Consider this code to open a window with a read-only number input:

presenter := SpPresenter new.
price := presenter newNumberInput
    editable: false;
    yourself.
layout := SpBoxLayout newTopToBottom
    add: price expand: false;
    yourself.
presenter
    layout: layout;
    open

The window opens like this:

Screenshot 2024-07-23 at 16 16 34

It is strange that the up and down buttons are present because the number input is read-only.

Now press any of the buttons. This is the result of pressing the up button once:

Screenshot 2024-07-23 at 16 16 55

Conclusion: the buttons allow changing the value of a read-only number input. That is a bug.

I suggest removing the buttons from read-only number inputs.