vaadin / vaadin/framework

Disabling and re-enabling a FormLayout with a Slider breaks Slider

Open
#11,619 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Stale workaround
Dominant language
Java
Stars
1.8k
Forks
717
Avg merge
2d 6h
Merged PRs (30d)
3

Description

  • Vaadin Framework version: 8.8.2
  • Browser version: At least Chrome and Firefox on Win 10
  • Description of the bug: Create a FormLayout with a Slider. Initially, set the FormLayout to disabled state, so that the Slider gets disabled too. Then re-enable the FormLayout. The slider looks like it's enabled, but it can't be moved with either with the keyboard or the mouse.

Minimal reproducible example:

        VerticalLayout rootLayout = new VerticalLayout();
        FormLayout layout = new FormLayout();
        Slider displayTime = new Slider("displaytime");
        displayTime.setMin(0);
        displayTime.setMax(100);
        layout.addComponent(displayTime);
        // DateField for comparison - it works as expected
        DateField dateField = new DateField("date");
        dateField.setValue(LocalDate.now());
        layout.addComponent(dateField);
        layout.setEnabled(false);
        rootLayout.addComponent(layout);
        Button button = new Button("re-enable FormLayout", e -> {
            layout.setEnabled(true);
        });
        rootLayout.addComponent(button);
        setContent(rootLayout);
  • Expected behavior: After clicking the Button, the Slider be interacted with as usual
  • Actual behavior: After clicking the Button, the Slider changes from disabled style to normal, but it can't be moved

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the minimal Java reproducible example in the issue, focusing on Slider and FormLayout state changes and comparing the working DateField behavior. Reproduce the sequence of disabling FormLayout, re-enabling it with the Button, and verify that the Slider responds to both keyboard and mouse input afterward.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.