Problem: The keydown() event trigger click() + focus(), causing extra character 's' captured to the input field. The focus() event should delay and put into keyup() event.
Commit: Every keyup() trigger if search panel is active, then focus() to its input field, else blur() to unfocus.
Another option is clear the input field each time when switching to the search panel, but the previous record entered by user cannot be kept, so I think the first approach is better.
Problem: The keydown() event trigger click() + focus(), causing extra character 's' captured to the input field. The focus() event should delay and put into keyup() event.
Commit: Every keyup() trigger if search panel is active, then focus() to its input field, else blur() to unfocus.
Another option is clear the input field each time when switching to the search panel, but the previous record entered by user cannot be kept, so I think the first approach is better.