-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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
fix(editor): Auto-focus expression input when switching from "fixed" mode #10686
Conversation
@@ -941,6 +941,14 @@ watch(remoteParameterOptionsLoading, () => { | |||
tempValue.value = displayValue.value as string; | |||
}); | |||
|
|||
// Focus input field when changing from fixed value to expression | |||
watch(isModelValueExpression, async (isExpression, wasExpression) => { |
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.
can you please add tests?
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.
I'm not sure how to test the focused state of the inline expression input. It's using Codemirror; hence, it's rendered as a div, not an input
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.
Nice 🎉 much smoother experience!
n8n Run #6754
Run Properties:
|
Project |
n8n
|
Branch Review |
autofocus-expression-after-switching
|
Run status |
Passed #6754
|
Run duration | 04m 51s |
Commit |
70fd5761d4: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 OlegIvaniv 🗃️ e2e/*
|
Committer | Oleg Ivaniv |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
0
|
Pending |
0
|
Skipped |
0
|
Passing |
424
|
View all changes introduced in this branch ↗︎ |
✅ All Cypress E2E specs passed |
Got released with |
Summary
A small fix to retain input focus when switching to expression mode.
CleanShot.2024-09-05.at.13.20.29.mp4
Related Linear tickets, Github issues, and Community forum posts
Review / Merge checklist
release/backport
(if the PR is an urgent fix that needs to be backported)