Originally an attempt to actually fix #196 instead of disabling the autocompletion altogether on affected browsers as was done in b59822342db1622a74ab4b95b844073ef93a2440. Didn't get very far and the code already started to look extremely horrendous, so I gave up. Things to do:
[ ] The first commit should be probably enough to fix all issues on Chrome, except for duplicated characters when overwriting autocompletion as noted in #196
[ ] Pressing (virtual) backspace on Firefox will randomly add an autocompletion highlight due to Firefox taking three input events to delete a highlight. Very annoying.
[ ] The mess added in the second commit to step around Firefox misfeaturebugs will probably break the behavior elsewhere
[ ] The code needs a cleanup / rework to make it maintainable again, TODOs removed, comments clarified
Leaving it here in case someone in the future would have the guts and preserverance to look at this cursed problem again.
Originally an attempt to actually fix #196 instead of disabling the autocompletion altogether on affected browsers as was done in b59822342db1622a74ab4b95b844073ef93a2440. Didn't get very far and the code already started to look extremely horrendous, so I gave up. Things to do:
Leaving it here in case someone in the future would have the guts and preserverance to look at this cursed problem again.