Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLOSED] Invoking "Find in Files" twice closes the modal bar #4439

Open
core-ai-bot opened this issue Aug 29, 2021 · 5 comments
Open

[CLOSED] Invoking "Find in Files" twice closes the modal bar #4439

core-ai-bot opened this issue Aug 29, 2021 · 5 comments

Comments

@core-ai-bot
Copy link
Member

Issue by gruehle
Friday Aug 16, 2013 at 23:56 GMT
Originally opened as adobe/brackets#4802


Steps to repro

  1. Invoke "Find in Files" (with the keyboard shortcut or selecting the menu item)
  2. Invoke it again

Results
The modal bar closes.

This broke with the new modal bar animation.

@core-ai-bot
Copy link
Member Author

Comment by gruehle
Friday Aug 16, 2013 at 23:56 GMT


To@njx, medium priority.

@core-ai-bot
Copy link
Member Author

Comment by rajeshsegu
Friday Aug 30, 2013 at 23:24 GMT


FindInFilesDialog() in FindinFiles.js should be a singleton, only one instance should exist. I don't understand why we keep recreating it instead of just resetting it.

Anyway, here is the fix running in my mind:

var _currentDialog;
    function _isCurrentDialogShowing(){
        return _currentDialog && !_currentDialog.closed;
    }

    function _setCurrentDialog(dialog){
        _currentDialog = dialog;
    }

In _doFindInFiles() method we just should not create another dialog if _isCurrentDialogShowing() is TRUE.

Let me know if you guys like the idea, I will be happy to make the change.

@core-ai-bot
Copy link
Member Author

Comment by njx
Thursday Sep 19, 2013 at 16:38 GMT


The behavior of the modal bar being recreated all the time is a holdover from old CodeMirror code that we copied when originally creating the various find dialogs. I think you're right that it should probably just be a singleton whose content gets swapped out, but we would need to figure out how to make that work for all the various things that use it (find in files, find/replace, and quick open)--some of them behave a little differently. Needs more thought.

@core-ai-bot
Copy link
Member Author

Comment by njx
Thursday Sep 19, 2013 at 16:51 GMT


Similar issue to #4500. Added a backlog item that should address this and other related bugs: https://trello.com/c/q2B82Zuv. Closing as move to backlog.

@core-ai-bot
Copy link
Member Author

Comment by rajeshsegu
Friday Sep 20, 2013 at 19:17 GMT


@njx@gruehle I say, these are entirely different bugs as they are two different dialog instances. This use-case is to do with the "Find in Files" getting recreating multiple times. Personally, I think they are similar but needs different set of fixes.

I can still take it if you guys are ok. Let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant