Skip to content

Commit

Permalink
fix: cursor jumping on android (#275)
Browse files Browse the repository at this point in the history
  • Loading branch information
hashwin authored and jfschwarz committed Oct 2, 2018
1 parent 19fb251 commit f073294
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/MentionsInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -368,15 +368,15 @@ class MentionsInput extends React.Component {

// Handle input element's select event
handleSelect = ev => {
// do nothing while a IME composition session is active
if (isComposing) return

// keep track of selection range / caret position
this.setState({
selectionStart: ev.target.selectionStart,
selectionEnd: ev.target.selectionEnd,
})

// do nothing while a IME composition session is active
if (isComposing) return

// refresh suggestions queries
const el = this.inputRef
if (ev.target.selectionStart === ev.target.selectionEnd) {
Expand Down

0 comments on commit f073294

Please sign in to comment.