-
Notifications
You must be signed in to change notification settings - Fork 383
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
Disable Code Editor #3608
Disable Code Editor #3608
Conversation
// Re-add controls when switching back from code to visual editor. | ||
const newEditorMode = getEditorMode(); | ||
if ( 'visual' === newEditorMode && newEditorMode !== editorMode ) { | ||
while ( ! document.querySelector( '.editor-block-list__layout' ) ) { |
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.
This is the worst loop I have ever seen 😱.
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 proud of it 😅
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.
Looks good, will have to check it out in local setup though.
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.
Works like a charm!
…-args-debugging * 'develop' of github.com:ampproject/amp-wp: (163 commits) Remove entries array test after completed. Update dependency core-js to v3.3.4 (#3624) Quick UX fixes (#3611) Fix most pressing RTL issues (#3558) Add test case for broken parent relationship Adapt broken test Throw a _doing_it_wrong() when an expected parent is not found Change template hierarchy query arguments to public Reuse data-set-focus to reliably match twentytwenty keyboard focus management Add tabindex attribute to modals Guess the role of a modal based on its classes Disable Code Editor (#3608) Update dependency postcss to v7.0.20 (#3613) Update dependency autoprefixer to v9.7.0 (#3614) Update dependency browserslist to v4.7.2 (#3612) Add rel=preconnect link for AMP CDN Fix block nav padding and margin (#3610) Adjust Gutenberg / WordPress requirement (#3609) Don't allow multiple CTA / attachment block to be pasted. (#3601) Fix page crashing when duplicating immovable blocks (#3593) ...
Summary
Addresses #3496.
Checklist