mirror of https://github.com/vector-im/riot-web
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#4974pull/21833/head
parent
757e42ddca
commit
36bb8b7dc4
|
@ -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 New Issue