diff --git a/packages/ui-default/build/config/webpack.ts b/packages/ui-default/build/config/webpack.ts index 088178460..d6c04861f 100644 --- a/packages/ui-default/build/config/webpack.ts +++ b/packages/ui-default/build/config/webpack.ts @@ -286,7 +286,6 @@ export default async function (env: { watch?: boolean, production?: boolean, mea }), new ExtractCssPlugin({ filename: `[name]-${version}.css?[fullhash:6]`, - chunkFilename: '[name]-[chunkhash:6].chunk.css', }), new WebpackManifestPlugin({}), new webpack.IgnorePlugin({ resourceRegExp: /(^\.\/locale$)/ }), diff --git a/packages/ui-default/components/messagepad/MessagePadDialogueContentContainer.jsx b/packages/ui-default/components/messagepad/MessagePadDialogueContentContainer.jsx index 4e1466ac0..8fb7368c1 100644 --- a/packages/ui-default/components/messagepad/MessagePadDialogueContentContainer.jsx +++ b/packages/ui-default/components/messagepad/MessagePadDialogueContentContainer.jsx @@ -18,12 +18,9 @@ const mapStateToProps = (state) => ({ // eslint-disable-next-line react-refresh/only-export-components export default connect(mapStateToProps)(class MessagePadDialogueContentContainer extends React.PureComponent { - componentDidMount() { - $(this.refs.list).scrollLock({ strict: true }); - } - componentDidUpdate(prevProps) { - const node = this.refs.list; + const node = this.state.ref; + if (this.props.activeId !== prevProps.activeId) { this.scrollToBottom = true; this.scrollWithAnimation = false; @@ -32,6 +29,8 @@ export default connect(mapStateToProps)(class MessagePadDialogueContentContainer this.scrollWithAnimation = true; } else this.scrollToBottom = false; + if (!node) return; + $(this.state.ref).scrollLock({ strict: true }); if (this.scrollToBottom) { const targetScrollTop = node.scrollHeight - node.offsetHeight; if (this.scrollWithAnimation) { @@ -93,14 +92,13 @@ export default connect(mapStateToProps)(class MessagePadDialogueContentContainer return ( <>