From 32aa3e4b9c791c231f23cdf9fe73c7569617e89b Mon Sep 17 00:00:00 2001 From: Alex Corrado Date: Thu, 8 Jun 2017 17:30:09 -0700 Subject: [Mac] Mostly work around tabbing issue There seems to be an issue with the way the key view loop is calculated with the NSTableView. This patch fixes it 95%, but I can still cause it to break if I scroll the table really quickly and then go back to where I was and attempt to keep tabbing forward/backward. This workaround overrides a private selector, as suggested by: https://forums.developer.apple.com/thread/16528#184148 --- Xamarin.PropertyEditing.Mac/Controls/BaseRectangleEditorControl.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Xamarin.PropertyEditing.Mac/Controls/BaseRectangleEditorControl.cs') diff --git a/Xamarin.PropertyEditing.Mac/Controls/BaseRectangleEditorControl.cs b/Xamarin.PropertyEditing.Mac/Controls/BaseRectangleEditorControl.cs index 3e6e144..d53d659 100644 --- a/Xamarin.PropertyEditing.Mac/Controls/BaseRectangleEditorControl.cs +++ b/Xamarin.PropertyEditing.Mac/Controls/BaseRectangleEditorControl.cs @@ -20,6 +20,9 @@ namespace Xamarin.PropertyEditing.Mac protected NSTextView HeightLabel { get; set; } protected NSTextField HeightEditor { get; set; } + public override NSView FirstKeyView => XEditor; + public override NSView LastKeyView => HeightEditor; + internal new PropertyViewModel ViewModel { get { return (PropertyViewModel)base.ViewModel; } set { base.ViewModel = value; } @@ -38,6 +41,7 @@ namespace Xamarin.PropertyEditing.Mac YLabel = new NSTextView { Editable = false, + Selectable = false, }; YEditor = new NSTextField (); YEditor.BackgroundColor = NSColor.Clear; @@ -47,6 +51,7 @@ namespace Xamarin.PropertyEditing.Mac WidthLabel = new NSTextView { Editable = false, + Selectable = false, }; WidthEditor = new NSTextField (); WidthEditor.BackgroundColor = NSColor.Clear; @@ -56,6 +61,7 @@ namespace Xamarin.PropertyEditing.Mac HeightLabel = new NSTextView { Editable = false, + Selectable = false, }; HeightEditor = new NSTextField (); HeightEditor.BackgroundColor = NSColor.Clear; -- cgit v1.2.3