Works with dynamically created items + bug fixes

Works with dynamically created items (like google.com or facebook.com).

Bug fixes:
- Restore caret position when cursor is in text box.
-