Conversation
|
Does this prevent it from occasionally erasing what was in there? |
|
While I wasn't able to repro that myself, I think it's due to it being overwritten as you type and the refresh happens. If that still happens after this is applied let me know. |
There was a problem hiding this comment.
We want to make sure it always ends up at the end, there's some cases where length would fail us (Opera sometimes sees a carriage return as 2 characters)
|
This could still have issues if the cursor is in the middle of the text -- maybe we can just get the Search box to not re-render? |
There was a problem hiding this comment.
small, but i would rename to $searchInput for clarity
|
@tpetr Looking at the code it seems it won't be that easy. The table is a subview of the search, making it the top level element. If we don't re-render that, nothing else can. :/ |
|
I did some more research and found a better solution for this. Now it'll save your caret position before rendering and reset it afterwards. This will also preserve any selections as well. |
|
💥 thanks |
After rendering move the cursor to the end of the input and keep it focused if there is text.
@wsorenson