Rivive: Fixed RTL positioning

Original author: tamirvs
Delay deactivating the dropdown
Revive: fixed error thrown if first search() callback returns []

Original author: trevorah
Revive: getCaretPosition() now takes text-align into account

Original author: trevorah