code review changes, attempt at FF fix
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
import React from 'react';
|
||||
import { defineMessages } from 'react-intl';
|
||||
|
||||
import { Drafty } from 'tinode-sdk';
|
||||
|
||||
import UploadingImage from '../widgets/uploading-image.jsx'
|
||||
|
||||
import { IMAGE_THUMBNAIL_DIM, BROKEN_IMAGE_SIZE, REM_SIZE } from '../config.js';
|
||||
import { fitImageSize } from './blob-helpers.js';
|
||||
import { idToColorClass } from './strformat.js';
|
||||
import { sanitizeImageUrl } from './utils.js';
|
||||
|
||||
import { Drafty } from 'tinode-sdk';
|
||||
|
||||
const messages = defineMessages({
|
||||
drafty_form: {
|
||||
id: 'drafty_form',
|
||||
|
||||
@@ -15,7 +15,6 @@ import LetterTile from '../widgets/letter-tile.jsx';
|
||||
import LoadSpinner from '../widgets/load-spinner.jsx';
|
||||
import LogoView from './logo-view.jsx';
|
||||
import SendMessage from '../widgets/send-message.jsx';
|
||||
import UploadingImage from '../widgets/uploading-image.jsx'
|
||||
|
||||
import { DEFAULT_P2P_ACCESS_MODE, IMAGE_PREVIEW_DIM, KEYPRESS_DELAY, MESSAGES_PAGE,
|
||||
MAX_EXTERN_ATTACHMENT_SIZE, MAX_IMAGE_DIM, MAX_INBAND_ATTACHMENT_SIZE, READ_DELAY,
|
||||
@@ -149,7 +148,6 @@ class MessagesView extends React.Component {
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
// this.propsChange(this.props, this.state);
|
||||
if (this.messagesScroller) {
|
||||
this.messagesScroller.addEventListener('scroll', this.handleScrollEvent);
|
||||
}
|
||||
@@ -977,10 +975,8 @@ class MessagesView extends React.Component {
|
||||
const ref = this.getOrCreateMessageRef(replyToSeq);
|
||||
if (ref && ref.current) {
|
||||
ref.current.scrollIntoView({block: "center", behavior: "smooth"});
|
||||
// ref.current.style.backgroundColor = 'rgb(0, 0, 0, 0.4)';
|
||||
ref.current.classList.add('flash');
|
||||
setTimeout(() => { ref.current.classList.remove('flash') } , 1000);
|
||||
//setTimeout(() => { ref.current.style.backgroundColor = ''; } , 1000);
|
||||
} else {
|
||||
console.error("Unresolved message ref: seqId", replyToSeq);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user