-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Document Outline: Restructured buttons to anchors #7170
Document Outline: Restructured buttons to anchors #7170
Conversation
I'm not sure why tests are failing, when I run |
const titleNode = document.querySelector( '.editor-post-title__input' ); | ||
const titleId = () => { | ||
if ( typeof titleNode.getAttribute( 'id' ) ) { | ||
titleNode.setAttribute( 'id', 'id-' + titleNode.innerHTML ); |
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.
We are changing a dom node rendered by React directly, that may have undesirable and unexpected effects.
Is using the same events/focus mechanism we had but just change the button to an anchor an option?
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.
Yes that would be great too. I think I tried to do that there, how would I change it to reflect a better practice?
Is it likely this will be resumed, or can it be closed? |
No update for a few weeks. I’m closing this one as it looks abandoned. |
Related: #10815 |
Description
Buttons inside the Document Outline component have been replaced with anchor tags in response to #7142.
How has this been tested?
npm run test
Types of changes
Checklist: