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

Canceling print will put the UI in a locked up state without an obvious resolution (Linux only) #2407

Closed
taw00 opened this issue Jan 30, 2020 · 11 comments · Fixed by #2410
Closed
Labels
bug It's a bug

Comments

@taw00
Copy link
Contributor

taw00 commented Jan 30, 2020

UPDATED description.

Joplin 1.0.179
OS: Fedora 31, Gnome 3.34

  1. Open Joplin
  2. Go to print something with CTRL-P
  3. Cancel it.
  4. Observe notification window that opens, but can't be removed excepted with the escape key which is perhaps non-obvious. Joplin is unusable until this action is taken.
  5. Closing Joplin does not remove the notification window and Joplin cannot be restarted in a useful state. ... until that ESCAPE key is hit. There is not indication that the user needs to hit the escape key.

Fun! See attachment that shows the little window that opens up.
Screenshot from 2020-01-29 10-28-57

@taw00 taw00 added the bug It's a bug label Jan 30, 2020
@taw00
Copy link
Contributor Author

taw00 commented Jan 30, 2020

log.txt had no error. Nor did any other log files. But I was able to produce this. I hope it helps.
Screenshot from 2020-01-29 23-05-00

@tessus
Copy link
Collaborator

tessus commented Jan 30, 2020

Hmm, this might be a Linux issue. It's also strange how the message looks like.

However, when cancelling, there should not be an error message at all. So there are actually 2 issues:

  • error message after cancelling
  • error message can't be dismissed (Linux)

With git master on macOS it looks like this:

image

@miciasto
Copy link
Contributor

miciasto commented Jan 30, 2020

It doesn't hang on Ubuntu 18.04, though I do get the warning dialog without any button, which I clear by Escape key.

@miciasto
Copy link
Contributor

miciasto commented Jan 30, 2020

@tessus

So there are actually 2 issues:
error message after cancelling
error message can't be dismissed (Linux)

The PR resolves the first issue.

The inability to dismiss a dialog box (@taw00) and a dialog box without OK button (me) are perhaps separate issues.

@miciasto
Copy link
Contributor

a dialog box without OK button (me) are perhaps separate issues.

Upon investigating in the code, this is intentional. So this part is not a bug.

@tessus
Copy link
Collaborator

tessus commented Jan 30, 2020

Upon investigating in the code, this is intentional.

This can't be. Otherwise there wouldn't be a button on macOS. Alao, please note the differences.
On macOS the dialog is bound to the main app window. On Linux it just pops up in the middle of the screen? Something is off.

@miciasto
Copy link
Contributor

miciasto commented Jan 30, 2020

Otherwise there wouldn't be a button on macOS

The Joplin error message dialog (for all Joplin error messages) is defined without any specifying buttons. The Electron doc says:

buttons String - Array of texts for buttons. On Windows, an empty array will result in one button labeled "OK".

but doesn't specify what will happen on other platforms.

If I explicitly add an OK button to the Joplin error message, then I get one (on Linux).

Perhaps we should do this? Or do we leave it up to the Electron default behaviours on the different platforms?

@tessus
Copy link
Collaborator

tessus commented Jan 30, 2020

I think we should add an OK button to bridge.js for showErrorMessageBox. But this is @laurent22's decision to make.

@taw00
Copy link
Contributor Author

taw00 commented Jan 31, 2020

Oh, geez. I was able to dismiss it with the ESC key as well. GAH! I'm an idiot.
Still... that shouldn't be the behavior. :)

Updated the headline and description. At least I don't have to kill -9 the sucker. Heh.

@taw00 taw00 changed the title Canceling print will lock up the UI Canceling print will lock up the UI and process until the escape key is hit Jan 31, 2020
@taw00 taw00 changed the title Canceling print will lock up the UI and process until the escape key is hit Canceling print with put the UI in a locked up state without an obvious resolution (Linux only) Jan 31, 2020
@taw00 taw00 changed the title Canceling print with put the UI in a locked up state without an obvious resolution (Linux only) Canceling print will put the UI in a locked up state without an obvious resolution (Linux only) Jan 31, 2020
@laurent22
Copy link
Owner

I think we should add an OK button to bridge.js for showErrorMessageBox. But this is @laurent22's decision to make.

Yes I agree, there should be an OK button by default. I can only assume that this is a bug in Electron that it's missing.

@miciasto
Copy link
Contributor

miciasto commented Feb 5, 2020

Yes I agree, there should be an OK button by default. I can only assume that this is a bug in Electron that it's missing.

Great! The bug might be platform specific. In any case, the pending PR includes a work around for it, so it will work on all platforms regardless.

laurent22 pushed a commit that referenced this issue Feb 5, 2020
…ter cancelling print. (#2410)

* Do not show "failed to print" warning dialog after cancelling print.

* Add reason to error string.

* Reform message string.

* Ensure OK button is displayed on error dialog.
@lock lock bot locked and limited conversation to collaborators Feb 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug It's a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants