Skip to content

Commit

Permalink
adding custom range input field
Browse files Browse the repository at this point in the history
  • Loading branch information
iruzevic committed Feb 5, 2025
1 parent 51fbf3f commit 489e8a1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Blocks/components/form/assets/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -1602,12 +1602,14 @@ export class Form {
// Range.
[...this.state.getStateElementByTypeField('range', formId)].forEach((range) => {
const input = this.state.getStateElementInput(range.name, formId);
const custom = this.state.getStateElementCustom(range.name, formId);

input?.removeEventListener('keydown', this.onFocusEvent);
input?.removeEventListener('focus', this.onFocusEvent);
input?.removeEventListener('blur', this.onBlurEvent);
input?.removeEventListener('input', this.onInputEvent);
input?.removeEventListener('keydown', this.onKeyDownEvent);
custom?.addEventListener('input', this.onRangeCustom);
});

// Date.
Expand Down

0 comments on commit 489e8a1

Please sign in to comment.