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;
|
const componentPosition = position;
|
||||||
position++;
|
position++;
|
||||||
|
|
||||||
const onMouseOver = () => this.setSelection(componentPosition);
|
const onMouseMove = () => this.setSelection(componentPosition);
|
||||||
const onClick = () => {
|
const onClick = () => {
|
||||||
this.setSelection(componentPosition);
|
this.setSelection(componentPosition);
|
||||||
this.onCompletionClicked();
|
this.onCompletionClicked();
|
||||||
|
@ -243,7 +243,7 @@ export default class Autocomplete extends React.Component {
|
||||||
key: i,
|
key: i,
|
||||||
ref: `completion${position - 1}`,
|
ref: `completion${position - 1}`,
|
||||||
className,
|
className,
|
||||||
onMouseOver,
|
onMouseMove,
|
||||||
onClick,
|
onClick,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue