Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 36bb8b7

Browse files
author
Luke Barnard
committed
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 element-hq/element-web#4974
1 parent 757e42d commit 36bb8b7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/views/rooms/Autocomplete.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ export default class Autocomplete extends React.Component {
233233
const componentPosition = position;
234234
position++;
235235

236-
const onMouseOver = () => this.setSelection(componentPosition);
236+
const onMouseMove = () => this.setSelection(componentPosition);
237237
const onClick = () => {
238238
this.setSelection(componentPosition);
239239
this.onCompletionClicked();
@@ -243,7 +243,7 @@ export default class Autocomplete extends React.Component {
243243
key: i,
244244
ref: `completion${position - 1}`,
245245
className,
246-
onMouseOver,
246+
onMouseMove,
247247
onClick,
248248
});
249249
});

0 commit comments

Comments
 (0)