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

Input, checkbox, select: Make focus and blur events public #4611

Closed
noahmulfinger opened this issue May 24, 2022 · 7 comments
Closed

Input, checkbox, select: Make focus and blur events public #4611

noahmulfinger opened this issue May 24, 2022 · 7 comments
Assignees
Labels
4 - verified Issues that have been released and confirmed resolved. enhancement Issues tied to a new feature or request. low risk Issues with low risk for consideration in low risk milestones spike Issues that need quick investigations for time estimations, prioritization, or a quick assessment.

Comments

@noahmulfinger
Copy link
Contributor

noahmulfinger commented May 24, 2022

Description

The internalBlur and internalFocus events are emitted from the input, checkbox, select, etc components. They are technically usable right now, but marked as internal so they are not documented. It would be useful to have those events publicly available for cases like form validation (when validation runs on blur).

Acceptance Criteria

The events are no longer marked as internal and don't have Internal in their names.

Relevant Info

No response

Which Component

calcite-checkbox, calcite-input, calcite-select

Example Use Case

In some of the developer website forms, we listen for blur events on each form input in order to trigger validation.

@noahmulfinger noahmulfinger added enhancement Issues tied to a new feature or request. 0 - new New issues that need assignment. needs triage Planning workflow - pending design/dev review. labels May 24, 2022
@driskull
Copy link
Member

I don't think we want to expose these internal events but we might want to experiment with delegatesFocus to see if that will trigger the onBlur on the component host.

onFocusOut might work now on the host but might not be the best solution.

@noahmulfinger
Copy link
Contributor Author

noahmulfinger commented May 24, 2022

Yeah I guess the main request would be having a way to listen for focus/blur events for calcite-checkbox, calcite-input, and other input-based components so the behavior generally matches native input elements, whether or not it involves the above internal events.

@noahmulfinger noahmulfinger changed the title Checkbox: Make focus and blur events public Input, checkbox, select: Make focus and blur events public May 24, 2022
@noahmulfinger
Copy link
Contributor Author

Just wanted to see if there could be any more movement/discussion on this issue. The focus/blur events are pretty important for form validation and matching native input behavior.

cc @macandcheese

@jcfranco
Copy link
Member

Thanks for the ping. According to our roadmap, we'll be looking at consistent focus/blur behavior across components in the upcoming sprints (starting in August). We have an issue to look into delegatesFocus, but none for focus/blur in particular. We could repurpose this one for that subtask. cc @benelan

@geospatialem geospatialem added spike Issues that need quick investigations for time estimations, prioritization, or a quick assessment. and removed needs triage Planning workflow - pending design/dev review. labels Oct 16, 2023
@geospatialem geospatialem added this to the 2023 December Priorities milestone Oct 16, 2023
@geospatialem geospatialem added the needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. label Oct 16, 2023
@geospatialem geospatialem removed this from the 2023 December Priorities milestone Oct 16, 2023
@geospatialem geospatialem added 1 - assigned Issues that are assigned to a sprint and a team member. and removed 0 - new New issues that need assignment. labels Dec 6, 2023
@geospatialem geospatialem added low risk Issues with low risk for consideration in low risk milestones and removed needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. labels Dec 6, 2023
@benelan
Copy link
Member

benelan commented Jun 25, 2024

The form components emit blur and focus events: https://codepen.io/benelan/pen/JjzQMpK

@benelan benelan added 3 - installed Issues that have been merged to master branch and are ready for final confirmation. and removed 1 - assigned Issues that are assigned to a sprint and a team member. labels Jun 25, 2024
Copy link
Contributor

Installed and assigned for verification.

@github-actions github-actions bot assigned DitwanP and unassigned benelan Jun 25, 2024
@geospatialem geospatialem added 4 - verified Issues that have been released and confirmed resolved. and removed 3 - installed Issues that have been merged to master branch and are ready for final confirmation. labels Jun 26, 2024
@geospatialem
Copy link
Member

Verified with the codepen provided by Ben above in 2.9.0. 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 - verified Issues that have been released and confirmed resolved. enhancement Issues tied to a new feature or request. low risk Issues with low risk for consideration in low risk milestones spike Issues that need quick investigations for time estimations, prioritization, or a quick assessment.
Projects
None yet
Development

No branches or pull requests

7 participants