Skip to content
New issue

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

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

Already on GitHub? # to your account

fix: Update range component to not trigger changes immediately after typing (close #643) #646

Merged
merged 2 commits into from
Oct 27, 2021

Conversation

maldoinc
Copy link
Contributor

@maldoinc maldoinc commented Sep 24, 2021

Please check if the PR fulfills these requirements

  • It's submitted to right branch according to our branching model
  • It's right issue type on title
  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)
  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes/features)
  • Docs have been added/updated (for bug fixes/features)
  • It does not introduce a breaking change or has description for the breaking change

Description

Hi all, in this PR I propose a change to the way the Range component handles user input. Currently, input will be processed immediately and in case it is smaller than a certain minimal value it will be replaced with the minimum value making it impossible to type widths such as "150" due to it because as soon as you select the text and type "1", that value will be replaced with "32".

The PR handles input differently by allowing the user to have a grace period of 350ms and only after that time passes is the input processed. This also addresses #643, which is the same problem experienced by another user of the library.

Looking forward to your input.

Copy link
Contributor

@lja1018 lja1018 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maldoinc
Thank you for your contribution.
If you apply for the review, I'll merge.

apps/image-editor/src/js/ui/tools/range.js Outdated Show resolved Hide resolved
@philipeatela
Copy link

Thank you for this!

@lja1018
Copy link
Contributor

lja1018 commented Oct 27, 2021

@maldoinc
Merge this PR into the master.
It will be included in the next version (probably 3.15.3).

@lja1018 lja1018 merged commit f3ff457 into nhn:master Oct 27, 2021
@maldoinc maldoinc deleted the fix/process-input-on-typing-end branch November 15, 2022 18:24
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants