Fix bug that inserted emoji when typing
This was quite simple in the end -- the mouse doens't move, but on some browsers, the autocomplete appearing beneath the mouse would cause the `onMouseOver`, which is not `onMouseMove`. The fix was to use `onMouseMove`. Fixes vector-im/riot-web#4974
This commit is contained in:
parent
757e42ddca
commit
36bb8b7dc4
1 changed files with 2 additions and 2 deletions
|
@ -233,7 +233,7 @@ export default class Autocomplete extends React.Component {
|
|||
const componentPosition = position;
|
||||
position++;
|
||||
|
||||
const onMouseOver = () => this.setSelection(componentPosition);
|
||||
const onMouseMove = () => this.setSelection(componentPosition);
|
||||
const onClick = () => {
|
||||
this.setSelection(componentPosition);
|
||||
this.onCompletionClicked();
|
||||
|
@ -243,7 +243,7 @@ export default class Autocomplete extends React.Component {
|
|||
key: i,
|
||||
ref: `completion${position - 1}`,
|
||||
className,
|
||||
onMouseOver,
|
||||
onMouseMove,
|
||||
onClick,
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue