[MM-50536] Add workaround for Dev Tools not opening correctly on Mac #2777
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Some reports were happening of developers having trouble opening the Dev Tools on macOS, requiring them to restart the Desktop App to make it work. After some investigating, I noticed that the
devtools-closed
event wasn't firing and theisDevToolsOpened()
call was returning true. This was happening everytime I would open a Dev Tools window for one server, then open a second window for a different, close the original one and then try to re-open the original one.I unfortunately wasn't able to find the root cause of this, since nothing had been reported to Electron and I wasn't able to reproduce on a Fiddle, so what I've done is create a workaround in which we check if the Dev Tools was successfully opened after the call was made, and if not we manually call
closeDevTools()
and then re-open, which seems to solve the issue.Ticket Link
https://mattermost.atlassian.net/browse/MM-50536