Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[MacOS] Readonly setting on macos only takes hold once field loses first responder #4834

Closed
PureWeen opened this issue Dec 20, 2018 · 0 comments · Fixed by #1972
Closed

[MacOS] Readonly setting on macos only takes hold once field loses first responder #4834

PureWeen opened this issue Dec 20, 2018 · 0 comments · Fixed by #1972
Labels
e/2 🕑 2 inactive Issue is older than 6 months and needs to be retested p/macOS t/bug 🐛
Projects

Comments

@PureWeen
Copy link
Contributor

Description

https://github.com/xamarin/Xamarin.Forms/pull/1972/files#r210107776

MacOS looks to have a quirk where if the field is the first responder when it goes readonly the field remains editable until it's no longer the first responder

a62168f1-b724-4b89-9fb1-489c46076e6c

Another way to see this is to add focus calls here.

toggle.Toggled += (_, b) =>
			{
				entryToggleable.IsReadOnly = b.Value;
				editorToggleable.IsReadOnly = b.Value;

				entryToggleable.Focus();
				editorToggleable.Focus();
			};

I'm wondering if ShouldBeginEditing would be a more thorough way to go?
https://stackoverflow.com/questions/7949071/iphone-ipad-how-to-make-uitextfield-readonly-but-not-disabled

Wire that up and return false if Element.IsReadOnly

Steps to Reproduce

  1. run Issue1678.cs and follow the steps in the gif

Expected Behavior

field should become readonly immediately not when you click out of field

Actual Behavior

you can still type in the field until the user clicks out of the field

@pauldipietro pauldipietro added this to New in Triage Dec 20, 2018
@PureWeen PureWeen moved this from New to External in Triage Dec 20, 2018
@samhouts samhouts added this to In Progress in v3.6.0 Jan 9, 2019
@samhouts samhouts added the inactive Issue is older than 6 months and needs to be retested label Jan 9, 2019
@samhouts samhouts removed this from External in Triage Jan 9, 2019
PureWeen pushed a commit that referenced this issue Jan 10, 2019
- fixes #1678
- fixes #4834

* InputView BindableProperty IsReadOnly

* Android Editor and Entry setup

* MacOS Editor and Entry setup

* Tizen Editor and Entry setup

* UAP Editor and Entry setup

* WPF Editor and Entry setup

* iOS Editor and Entry setup

* Issue1678 - TestContentPage added

* Tests added

* Tizen Editor and Entry fix

* UI Test fix

* Android fix for Entry and Editor.

* Unit Tests fix.

* Android Renderer first try.

* MacOS Entry renderer small fix.

* UpdateEditable fix.

* Android Entry and Editor reduced number of calls to BP.

* fix TestAttributes conflicts

* Remove keyboard

* [macOS] relinquish first responder

* [Android] remove call to UpdateCursorSelection

* [UWP] fix tabs
@samhouts samhouts moved this from In Progress to Done in v3.6.0 Jan 10, 2019
PureWeen pushed a commit that referenced this issue Jan 24, 2019
- fixes #1678
- fixes #4834

* InputView BindableProperty IsReadOnly

* Android Editor and Entry setup

* MacOS Editor and Entry setup

* Tizen Editor and Entry setup

* UAP Editor and Entry setup

* WPF Editor and Entry setup

* iOS Editor and Entry setup

* Issue1678 - TestContentPage added

* Tests added

* Tizen Editor and Entry fix

* UI Test fix

* Android fix for Entry and Editor.

* Unit Tests fix.

* Android Renderer first try.

* MacOS Entry renderer small fix.

* UpdateEditable fix.

* Android Entry and Editor reduced number of calls to BP.

* fix TestAttributes conflicts

* Remove keyboard

* [macOS] relinquish first responder

* [Android] remove call to UpdateCursorSelection

* [UWP] fix tabs
andreinitescu pushed a commit to andreinitescu/Xamarin.Forms that referenced this issue Jan 29, 2019
- fixes xamarin#1678
- fixes xamarin#4834

* InputView BindableProperty IsReadOnly

* Android Editor and Entry setup

* MacOS Editor and Entry setup

* Tizen Editor and Entry setup

* UAP Editor and Entry setup

* WPF Editor and Entry setup

* iOS Editor and Entry setup

* Issue1678 - TestContentPage added

* Tests added

* Tizen Editor and Entry fix

* UI Test fix

* Android fix for Entry and Editor.

* Unit Tests fix.

* Android Renderer first try.

* MacOS Entry renderer small fix.

* UpdateEditable fix.

* Android Entry and Editor reduced number of calls to BP.

* fix TestAttributes conflicts

* Remove keyboard

* [macOS] relinquish first responder

* [Android] remove call to UpdateCursorSelection

* [UWP] fix tabs
@samhouts samhouts added this to In Progress in v4.0.0 Feb 2, 2019
@samhouts samhouts removed this from Done in v3.6.0 Feb 2, 2019
@samhouts samhouts moved this from In Progress to Done in v4.0.0 Feb 4, 2019
@samhouts samhouts removed this from Done in v4.0.0 Feb 7, 2019
@samhouts samhouts added this to In Progress in v3.6.0 Feb 7, 2019
@samhouts samhouts moved this from In Progress to Done in v3.6.0 Feb 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
e/2 🕑 2 inactive Issue is older than 6 months and needs to be retested p/macOS t/bug 🐛
Projects
No open projects
v3.6.0
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants