Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix editing the search input when toggling the search pane #1072
Description of the Change
The find and replace package was causing some issues with the cursor when hiding and showing the search panel under some circumstances. I could find two scenarios where this was happening:
The issues comes from the fact that on every search the find view is re-setting the
I haven't been able to find the root issue that's causing the bad state on the
I haven't added any automated test that verifies the correct behaviour, since it may be a bit complex to reproduce the issue programatically (haven't checked it though), but I'll happily add a test case if you think it's worth it :)
Users won't get confused when toggling the search bar and not being able to change the search text.
This closes #1067
Thanks for the suggestion! I've managed to create a test that was failing before this fix, I'm not proud of the test since it's asserting an implementation detail of the editor (the selection DOM element size) but that's the only way that I've managed to assert the correct behaviour.
To give some context about the issue, the root problem can only be seen in the internal state of the
From my investigation, this is what I think was going on before this PR:
Based on this, a better fix to this same issue would be to change the logic that handles the update of the grammar of a