Text re-appears in input box after clearing the model
Closed this issue · 5 comments
To reproduce the issue - in the official plunkr sample (http://plnkr.co/edit/cMvm7Z4REuIP69Uk4Tzz?p=preview), do the following:
-Type something in the editable model input box.
-Click 'Clear value to null'
-Press the input box (return focus)
-Press outside the input box (lose focus).
The cleared text re-appears in the input box (despite the model being null).
BTW - it's not directly related to clearing the model - reproduces even if you just change the model (set it to some text instead of null).
👍 Suffer from this too.
Appears to be a "bug" in typeahead https://github.com/twitter/typeahead.js/blob/f835e162ec4551479114fd245c907ae032de692a/src/typeahead/input.js#L95-L98
Those lines are what trigger it, don't know for what purpose it's there.
@amithalb can you try repeating on here: http://plnkr.co/edit/eTFN07NVsmxg5iwLCNNV?p=preview
this includes the PR that just got merged
@NotBobTheBuilder Cool thanks!