podio/jquery-mentions-input — Issue #13: inputBuffer stores empty "" on backspace (MAC/Firefox)
Author: jcooke-ce
Created: 2011-12-21 04:17:56+00:00
State: open

1. Start to mention someone:
"@pete"

2. The search box appears like normal, showing pete's
3. Press the backspace key and the autosuggest dissapears until you delete all the way back to the @ then retype

I've found a quick hack so you can do a check on the keycode within onInputBoxKeyPress:

```javascript
function onInputBoxKeyPress(e) {
// Check if this is a backspace key as it seems to insert a space, which is then not spliced
if (e.keyCode !== 8) {
var typedValue = String.fromCharCode(e.which || e.keyCode);
inputBuffer.push(typedValue);
}
}
```

Cheers

James