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

readonly value of MultilineTextInput for iOS is inverted #1859

Closed
o-fedorov opened this issue Apr 10, 2023 · 2 comments · Fixed by #1869
Closed

readonly value of MultilineTextInput for iOS is inverted #1859

o-fedorov opened this issue Apr 10, 2023 · 2 comments · Fixed by #1869
Labels
bug A crash or error in behavior. iOS The issue relates to Apple iOS mobile support.

Comments

@o-fedorov
Copy link
Contributor

o-fedorov commented Apr 10, 2023

Describe the bug

For iOS, readonly=False makes MultilineTextInput read-only. readonly=True makes it editable.

Steps to reproduce

  1. Build the multilinetextinput example for iOS: https://github.com/beeware/toga/tree/main/examples/multilinetextinput. Optionally, add print(self.multiline_input.readonly) to some places, like startup method, or in readonly_toggle_pressed before and after the change.
  2. Launch the app.
  3. Note that at startup the input is not editable. If there is a print statement, it outputs False.
  4. Click on "Toggle readonly". The input is now editable, and print(self.multiline_input.readonly) will return True after the toggle is executed.

Expected behavior

By default (when readonly parameter is not provided to MultilineTextInput, it should be editable. Setting multiline_input.readonly to True should make it read-only. Settign it to False should make it editable.

Screenshots

No response

Environment

  • Operating System: iOS, "iPhone 14"
  • Python version: 3.8
  • Software versions:
    • Briefcase: 0.3.13
    • Toga: 0.3.0

Logs


Additional context

No response

@o-fedorov o-fedorov added the bug A crash or error in behavior. label Apr 10, 2023
@mhsmith mhsmith added the iOS The issue relates to Apple iOS mobile support. label Apr 11, 2023
@freakboy3742
Copy link
Member

Thanks for the report - a fairly obvious mistake (and fix). We should be auditing MultilineTextInput in the near future; but if you want to submit a PR, we'd be happy to merge it.

@o-fedorov
Copy link
Contributor Author

@freakboy3742 done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A crash or error in behavior. iOS The issue relates to Apple iOS mobile support.
Projects
None yet
3 participants