Fix local echo comment for scroll tokens
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>pull/21833/head
parent
d111f4cbb1
commit
ea6904ce2a
|
@ -906,6 +906,8 @@ export default class EventTile extends React.Component<IProps, IState> {
|
||||||
permalink = this.props.permalinkCreator.forEvent(this.props.mxEvent.getId());
|
permalink = this.props.permalinkCreator.forEvent(this.props.mxEvent.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// we can't use local echoes as scroll tokens, because their event IDs change.
|
||||||
|
// Local echos have a send "status".
|
||||||
const scrollToken = this.props.mxEvent.status
|
const scrollToken = this.props.mxEvent.status
|
||||||
? undefined
|
? undefined
|
||||||
: this.props.mxEvent.getId();
|
: this.props.mxEvent.getId();
|
||||||
|
@ -1153,8 +1155,6 @@ export default class EventTile extends React.Component<IProps, IState> {
|
||||||
"tabIndex": -1,
|
"tabIndex": -1,
|
||||||
"aria-live": ariaLive,
|
"aria-live": ariaLive,
|
||||||
"aria-atomic": "true",
|
"aria-atomic": "true",
|
||||||
// we can't use local echoes as scroll tokens, because their event IDs change.
|
|
||||||
// Local echos have a send "status".
|
|
||||||
"data-scroll-tokens": scrollToken,
|
"data-scroll-tokens": scrollToken,
|
||||||
"onMouseEnter": () => this.setState({ hover: true }),
|
"onMouseEnter": () => this.setState({ hover: true }),
|
||||||
"onMouseLeave": () => this.setState({ hover: false }),
|
"onMouseLeave": () => this.setState({ hover: false }),
|
||||||
|
|
Loading…
Reference in New Issue