-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Set editor mode on initialization to prevent initial text editor focus #35701
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
Conversation
Test Results SummaryCommit SHA: 78615f8
To view the full API test report, click here. To view the full E2E test report, click here. To view all test reports, visit the WooCommerce Test Reports Dashboard. |
mdperez86
left a comment
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.
Some linter problems
…sions of block store
|
Thanks for noting that, @mdperez86! Updated in b186c77 to check for this method since the unit tests don't have access to the same block editor store. |
| return; | ||
| } | ||
|
|
||
| __unstableSetEditorMode( val ? 'initialized' : 'edit' ); |
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 know that TypeScript says explicitly it's a boolean, but reading this part with val made me confused for a little bit. What do you think about renaming to isInitializing?
mdperez86
left a comment
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.
LGTM
* Use workflow dispatch that now works with GITHUB_TOKEN * check if post_type exists (woocommerce#34501) * check if post_type exists * Changelog. Co-authored-by: barryhughes <[email protected]> * Fix Protected Directory Detection and Admin Notice (woocommerce#33544) * Fix Protected Directory Admin Notice - make notice actually close when clicking "Dismiss" - make unprotected directory detection smarter: not every /woocommerce_uploads/ page with content is a directory listing * Unwind the change made to method `is_uploads_directory_protected()`. Discussion here https://github.com/woocommerce/woocommerce/pull/33544/files#r910253861 relates. In essence, we felt it better to have more warnings prompting the user to evaluate if the directory is protected, than fewer warnings with an increased change of not flagging actual problems. * Add changelog. Co-authored-by: barryhughes <[email protected]> * Update wc-account-functions.php (woocommerce#32026) * Update wc-account-functions.php Correct order of single/plural translation strings to prevent confusion with translations and translators. * Changelog. Co-authored-by: barryhughes <[email protected]> * Set editor mode on initialization to prevent initial text editor focus (woocommerce#35701) * Set editor mode on initialization to prevent initial text editor focus * Add changelog entry * Check for editor set method to prevent breaks in tests with older versions of block store * Update argument name for initialization * Use workflow dispatch that now works with GITHUB_TOKEN (#6) * Fix indentation of code freeze yml file * Dev/use workflow dispatch (#8) * Fix indentation of code freeze yml file * Use context to get repo and owner. * Send the required inputs to dispatched workflow. Co-authored-by: Sam Seay <[email protected]> Co-authored-by: justasdobrovolskis <[email protected]> Co-authored-by: barryhughes <[email protected]> Co-authored-by: Andrew <[email protected]> Co-authored-by: Philip <[email protected]> Co-authored-by: Joshua T Flowers <[email protected]>
All Submissions:
Changes proposed in this Pull Request:
This PR is a workaround to prevent Gutenberg's focus of initially selected elements. Note that we need to select an element initially in order to get the toolbar to show, but we don't the focus to immediately go to these editors.
Closes #35697 .
How to test the changes in this Pull Request:
Other information:
pnpm --filter=<project> changelog add?FOR PR REVIEWER ONLY: