-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Quote Block: Fixing focus transfer between citation and content #5100
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
.wp-block-quote { | ||
margin: 0; | ||
|
||
cite { | ||
display: block; | ||
} | ||
} | ||
|
||
.wp-block-quote:not(.is-large) { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -740,7 +740,9 @@ export class RichText extends Component { | |
!! this.editor && | ||
this.props.tagName === prevProps.tagName && | ||
this.props.value !== prevProps.value && | ||
this.props.value !== this.savedContent | ||
this.props.value !== this.savedContent && | ||
! isEqual( this.props.value, prevProps.value ) && | ||
! isEqual( this.props.value, this.savedContent ) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the real fix. I removed this as part of #4955 but it's necessary to avoid unnecessarily content updates. I don't see any performance loss in adding this and it could even improve performance because we don't use those TinyMCE functions There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @youknowriad I feel like we removed and added this a few times I the last year now. :) Maybe worth leaving a comment? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (I was surprised to see these lines again.) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good call 👍 |
||
) { | ||
this.updateContent(); | ||
} | ||
|
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 just increases the click area of the citation to the whole line (width: 100%)
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 kind of tells me that we shouldn't be using cite for this... :)