-
Notifications
You must be signed in to change notification settings - Fork 0
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
Force focus into HTML5 input #273
Conversation
Reviewer's Guide by SourceryThis pull request focuses on enhancing the focus behavior of the datepicker and combobox components. It ensures that when these components receive focus, the focus is correctly placed within the input field, and the text within the input is selected for better user experience. Additionally, it updates the versions of several development dependencies. Sequence diagram for enhanced datepicker focus behaviorsequenceDiagram
actor User
participant DP as DatePicker
participant Input as HTML5 Input
User->>DP: Focus on component
DP->>Input: Set focus
alt Has existing value
DP->>Input: Select text range (0 to value.length)
end
Note over DP,Input: New forceInputFocus() method
Note over DP,Input: Ensures focus and text selection
Sequence diagram for enhanced combobox focus behaviorsequenceDiagram
actor User
participant CB as ComboBox
participant Input as Input Element
User->>CB: Focus on component
CB->>CB: focus()
alt Has input value
CB->>Input: setSelectionRange(0, value.length)
end
Note over CB,Input: Enhanced focusin event handler
Note over CB,Input: Automatically selects existing text
Class diagram showing updated AuroDatePicker componentclassDiagram
class AuroDatePicker {
+focus()
-forceInputFocus()
-inputList[]
-value
-valueEnd
}
note for AuroDatePicker "Added forceInputFocus() method
Enhanced focus handling"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
667acf4
to
80d856e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @jordanjones243 - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
80d856e
to
78f6908
Compare
* @private | ||
* @returns {void} | ||
*/ | ||
forceInputFocus() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might want to experiment with if enabling "delegate focus" helps at all. But otherwise looks good to me.
Work done in this PR fixes handling of forcing focus into input and all input components now behave the same way: |
Alaska Airlines Pull Request
Before Submitting this pull request:
Development
sectionnote: all pull requests require at least one linked ticket
Ready For Review
, all ticket's linked underDevelopment
must have their status changed toReady For Review
as wellBy submitting this Pull Request, I confirm that my contribution is made under the terms of the Apache 2.0 license and I have performed a self-review of my own update.
Summary by Sourcery
Update component libraries to the latest versions and force focus into datepicker and combobox inputs to highlight text when tabbing into the components.
New Features:
Enhancements: