Mac Desktop: CMD+Z Doesn't undo in the desktop app
1. Download Mac desktop app from https://github.com/mattermost/desktop/releases/tag/v4.3.0-rc-2 (mattermost-desktop-4.3.0-develop-mac.dmg)
2. Log into https://rc.test.mattermost.com/
3. Copy this text `Hello world testing 123456`
4. Paste it in the message input field by pressing CMD+V
5. Press CMD+Z to undo
6. The text is not removed from the message input box (this works on the webapp, however not on the desktop app)
QA Test Steps
Use the steps in the description with the Desktop app v4.3.2 or greater and:
Also test 'redo' using CMD-SHIFT-Z
Tested and Passed on 4.3.2-rc1, Mac Desktop
CMD+Z and “redo” CMD+Shift+Z work as expected
QA note: Test to be added to release spreadsheet. PR labeled. Closing.
This does seem to be Electron related and doesn't even work in the just released Electron v7.0.0. To be fair, it's most likely Chromium related and there seemingly isn't anything that Electron can do about it.
Related conversation: https://community-release.mattermost.com/core/pl/b95bi44r4bbnueqzjjxsi46qiw
The solution may be to switch from using the `<webview>` tag to using an Electron api called `BrowserView`. The challenge with this approach is that `BrowserView` is not an HTML tag and apparently needs to be created in the main process (node) so we would need to re-architect a fair amount of the code for displaying the Webapp in tabs.
I created a local controlled test for loading the Webapp in `<webview>` and `BrowserView` without all the additional Desktop logic (trying to determine if the issue is Electron or something in the Desktop code). The `<webview>` still prevents CMD-Z from working while the `<webview>` is focused, but the shortcut works as expected when using `BrowserView`.
Likely Electron related
Cannot reproduce on Linux or Windows. Unassigning myself so maybe someone with a Mac can test this?