quist00 / onesearch-local

Provides a anuglar2 implementation of OneSearch (formerly Primo) searchbox that can be embedded on library's page
GNU General Public License v3.0
0 stars 0 forks source link

Incomplete search queries when typing and submitting quickly #12

Closed Steve-A-Orr closed 7 years ago

Steve-A-Orr commented 7 years ago

This was recently reported by one of our librarians:

Reported by one of our student assistants at the desk, when searching the OneSearch searchbox on the homepage, if you are typing your query and then quickly press enter when done typing, it will sometimes not pick up the last letter of your query.

https://www.screencast.com/t/SPifY8Gj2bs https://www.screencast.com/t/3jqxS8gp https://www.screencast.com/t/Z7511vkVW

Strangely, seems to happen quite consistently to certain words that end in the letter Y, but I've also seen it happen with the word "wolves", it's just much harder to do.

This problem does not replicate when searching OneSearch itself.

I gave him the "Stay calm and type slowly" advice, but promised to bring it to you for consideration. I just read issue #10 and think it could be the same...or similar. I'll ask what browsers they were using.

Steve-A-Orr commented 7 years ago

It was reported as to affect both Firefox and Chrome. I cannot replicate this, myself; and I thought I was a fast typer. I wonder if it has something to do with hardware. Will continue to attempt to replicate. Frankly, it is just as likely that they are just touching the last button and not actually activating it.

quist00 commented 7 years ago

based upon how the code is written I see how it would be possible. A small change should eliminate the potential for it so don't worry about replicating further for now. maybe just have same tester try it when it goes live if you can

quist00 commented 7 years ago

code now calls cleanSearch against the raw search at point of submission by keyboard rather than referencing the cleaned up string. This should solve for the issue. re-open if that is not the case.