Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conditional rendering of another field based on value of a Number field when using mouse to step up and down #1693

Open
ncastle-veic opened this issue Dec 23, 2024 · 1 comment
Assignees
Labels
issue Something isn't working correctly

Comments

@ncastle-veic
Copy link

What happened?

What I'm trying to achieve

When building a form that uses a number field and a file upload field, I need the file upload to conditionally render based on a certain value in the number field.

Problem

All works as expected when using the keyboard to manually enter a number into the number field or using the arrow keys on the keyboard to step up and down on the number field, but when the mouse is used to step up and down, the conditional rule is not triggered when stepping past the value that is set in the conditional rule. The rule is also not triggered when using the mouse scroll wheel to change the value of the number field.

Other notes

I'm assuming this is NOT expected behavior and that maybe there is just a missing event listener. If this IS expected behavior, then disregard this issue!

Errors and Stack Trace (if available)

No response

How can we reproduce this?

  1. Create a new form
  2. Add a Number field to the form
  3. Add a File Upload field to the form
  4. Navigate to the Rules tab
  5. Add a rule on the File Upload field
  6. Select to show the field when any of the following conditions are met
  7. Add a rule that shows the File Upload field when the number field is greater than or equal to any number, ex 5
  8. Render the form on a page
  9. Navigate to the page in your browser
  10. See behavior of conditional rule
    • With keyboard:
      • Enter a number below the rule, see the file upload field is not displayed
      • Enter a number greater than or equal to the rule, see the File Upload field is displayed
      • Use arrow keys to step up and down past the rule, see the File Upload field is hidden or shown correctly depending on the value of the Number field
    • With mouse:
      • Step up and down using the arrows on the Number field and see the conditional rule is not triggered when stepping up and down past the number set in the rule
      • Use mouse scroll wheel to change the value of the Number field and see the conditional rule is not triggered when stepping past the number set in the rule

Freeform Edition

Pro

Freeform Version

5.8.3

Craft Version

5.5.7

When did this issue start?

Unsure

Previous Freeform Version

No response

@ncastle-veic ncastle-veic added the issue Something isn't working correctly label Dec 23, 2024
@kjmartens
Copy link
Contributor

Sorry about this @ncastle-veic,

We'll check into it and should have a fix shortly. 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue Something isn't working correctly
Development

No branches or pull requests

3 participants