sugarlabs / sugar

Sugar GTK shell
GNU General Public License v3.0
257 stars 242 forks source link

Focus lost during Journal search #869

Open quozl opened 5 years ago

quozl commented 5 years ago

Reproducer: create several journal objects, display the journal, click in the search box, begin typing the word "activity" slowly while watching the cursor. Repeat again but pause typing within the word.

Expected result: the word "activity" is in the box and the journal displays only those objects containing the word.

Observed result: if the pause is long enough, focus is lost, and the remaining letters typed are discarded.

ShivanshRakesh commented 4 years ago

Hi @quozl! I would like to work on this issue.

Won't changing value of _AUTOSEARCH_TIMEOUT in journaltoolbox.py from 1000 to something around 5000 fix this? Since, it looks like 1 sec is kind of too less for the same.

quozl commented 4 years ago

Thanks for letting us know. See Contributing which says "no need to ask permission to work on an issue."

Increasing _AUTOSEARCH_TIMEOUT like that will obviously break the automatic search function, and therefore not acceptable. The problem would still occur. However, consider temporarily decreasing it to 100 milliseconds to make testing and solving the problem easier.

I'm not here to explain how to fix the problem, I'd rather do it myself than explain it, but happy to answer any questions you may have about the problem, and to review the working solution you come up with.

ShivanshRakesh commented 4 years ago

Okay. Thanks!