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

Desktop: Fixes #10887: Prevent disabling of textbox inputs after entering an incorrect password #11241

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

mrjo118
Copy link

@mrjo118 mrjo118 commented Oct 21, 2024

On Joplin desktop (tested on Windows), when you use the enable encryption setting after a master password has been set, if you enter an incorrect password, then textbox inputs across the whole application are disabled as a result. This persists until minimising or restarting Joplin, or switching between different windows. This may be related to opening a standard alert dialog while a smalltalk prompt is active, as changing the validation error to use a smalltalk alert seems to fix the issue. Note that there is a slight change in behaviour in that the initial smalltalk prompt is closed when the validation error appears, but this shouldn't really be a big deal from a user perspective.

Video showing the current behaviour:
https://github.com/user-attachments/assets/6fabc55a-ae4b-47ce-b076-7f5181993130

Video showing the new behaviour:
https://github.com/user-attachments/assets/5580f810-e91d-4f55-9da7-e160ed77940e

This fixes #10887

…when clicking the enable encryption button in Encryption settings
@personalizedrefrigerator
Copy link
Collaborator

Thank you for fixing this!

I'm linking to the related Electron issue: electron/electron#31917

@personalizedrefrigerator
Copy link
Collaborator

Note that there is a slight change in behaviour in that the initial smalltalk prompt is closed when the validation error appears, but this shouldn't really be a big deal from a user perspective.

If this is undesired behavior, alternatives to smalltalk dialogs include:

  • shim.showMessageBox
  • bridge().showErrorMessageBox

@mrjo118
Copy link
Author

mrjo118 commented Oct 21, 2024

Note that there is a slight change in behaviour in that the initial smalltalk prompt is closed when the validation error appears, but this shouldn't really be a big deal from a user perspective.

If this is undesired behavior, alternatives to smalltalk dialogs include:

* `shim.showMessageBox`

* `bridge().showErrorMessageBox`

I just noticed actually that there's not technically a change in behaviour. If you watch the video of the current behaviour you can see that when the error popup opens, the original prompt is still there behind it (in the new behaviour the dialog is replaced). But when you click ok it actually closes both dialogs. So my code change makes a visual difference but not a change in behaviour from a usability perspective.

Using shim.showMessageBox and bridge().showErrorMessageBox both spawn a new dialog on top of the smalltalk one, but shim has an info icon and both an ok and cancel button (which is kind of pointless), while bridge is very much like the existing dialog but more prominent that it is an error. Both of these options do solve the issue as well as my original solution, so it's really a matter of preference which to choose.

original:
original

smalltalk:
smalltalk

shim:
shim

bridge:
bridge

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