Updated from tootsuite
This commit is contained in:
@@ -32,7 +32,7 @@ export default class ExtendedVideoPlayer extends React.PureComponent {
|
||||
|
||||
render () {
|
||||
return (
|
||||
<div className='extended-video-player' style={{ width: this.props.width, height: this.props.height }}>
|
||||
<div className='extended-video-player'>
|
||||
<video
|
||||
ref={this.setRef}
|
||||
src={this.props.src}
|
||||
|
||||
@@ -140,7 +140,7 @@ export default class ComposeForm extends ImmutablePureComponent {
|
||||
|
||||
handleEmojiPick = (data) => {
|
||||
const position = this.autosuggestTextarea.textarea.selectionStart;
|
||||
const emojiChar = String.fromCodePoint(parseInt(data.unicode, 16));
|
||||
const emojiChar = data.unicode.split('-').map(code => String.fromCodePoint(parseInt(code, 16))).join('');
|
||||
this._restoreCaret = position + emojiChar.length + 1;
|
||||
this.props.onPickEmoji(position, data);
|
||||
}
|
||||
|
||||
@@ -8,8 +8,6 @@ function main() {
|
||||
const React = require('react');
|
||||
const ReactDOM = require('react-dom');
|
||||
|
||||
require.context('../images/', true);
|
||||
|
||||
if (window.history && history.replaceState) {
|
||||
const { pathname, search, hash } = window.location;
|
||||
const path = pathname + search + hash;
|
||||
|
||||
@@ -126,7 +126,7 @@ const insertSuggestion = (state, position, token, completion) => {
|
||||
};
|
||||
|
||||
const insertEmoji = (state, position, emojiData) => {
|
||||
const emoji = String.fromCodePoint(parseInt(emojiData.unicode, 16));
|
||||
const emoji = emojiData.unicode.split('-').map(code => String.fromCodePoint(parseInt(code, 16))).join('');
|
||||
|
||||
return state.withMutations(map => {
|
||||
map.update('text', oldText => `${oldText.slice(0, position)}${emoji} ${oldText.slice(position)}`);
|
||||
|
||||
Reference in New Issue
Block a user