Skip to content

Conversation

@juliusknorr
Copy link
Member

Summary

Otherwise the unified search does not trigger properly if a rich workspace is shown. With this PR the browser default search will be only triggered by text if the keydown event is triggered on the editor input.

Using the regular fallback with hitting Ctrl-F twice would not work here since when editing in the viewer the unified search is hidden in the background and therefore the user doesn't get any feedback when hitting ctrl-f for the first time. Also when having the text focused I think that searching in it is a sane default.

@azul
Copy link
Contributor

azul commented Aug 26, 2020

Code looks good to me.

🧐 Minor nitpick: Keymap class sounds very generic and behaves generic in that all of it's behaviour is specified through the options during construction. At the same time it now implements special treatment for ctrl-f. Seems counter intuitive that by adding a keymap to the editor that handles mod-s you also get special treatment for ctrl-f.

Maybe put the plugin into a separate class like BrowserSearch or so?

Copy link
Contributor

@azul azul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed that it fixes the issue in files.
Keeps using browser search when opening a file in the viewer and looking at the sidebar. I think that is the behavior we want.

I have not played with this in talk.

@juliusknorr juliusknorr merged commit c17ef69 into master Aug 26, 2020
@juliusknorr juliusknorr deleted the bugfix/802 branch August 26, 2020 13:38
@juliusknorr juliusknorr mentioned this pull request Aug 26, 2020
@juliusknorr
Copy link
Member Author

/backport 52a20e2 to stable19

@juliusknorr
Copy link
Member Author

/backport 52a20e2 to stable18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

'Show rich workspaces' breaks CTRL+F

3 participants