Skip to content

Unexpected behaviour when input field is not properly positioned #1

@stephanbruijnis

Description

@stephanbruijnis

Hi,

I've experienced some unexpected behaviour with the boolean slider. By default the Boolean Slider in Mendix 5.17 and above has an element which is positioned incorrectly.

Any clicks on the other nodes (the div's) triggers the _setupEvents function twice. And the order in which the change event and the executeaction (onchange microflow) is triggered may vary.

Reproduction:
Add boolean slider to project as usual. Add an onchange microflow which commits the object.
Open browser, press F12 for console.
Use inspector to determine position of the element. Note it's position is only partly overlapping the boolean slider
Click on the boolean slider but not on the element.
Check the console / network activity to the xas.
2 or more posts are made, however if you click a few times you will note that the order of the change and executeaction may vary. (Thus first onchange microflow with commit, then change object to true/false). Which is undesirable behaviour.

By default the element is (in the latest Mendix versions) positioned incorrectly.

And it might be a good idea to add to the documentation that the element should be handling all input (clicks) thus it shouldn't be styled to 1px by 1px for example.

With kind regards,
Stephan

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions