diff options
author | Alex Corrado <alexc@xamarin.com> | 2017-06-09 03:30:09 +0300 |
---|---|---|
committer | Dominique Louis <savagesoftware@gmail.com> | 2017-06-15 20:28:00 +0300 |
commit | 32aa3e4b9c791c231f23cdf9fe73c7569617e89b (patch) | |
tree | 2e85de35e0f2907dcba8f97ca4ed362d69514a8a /Xamarin.PropertyEditing.Mac/Controls/BaseRectangleEditorControl.cs | |
parent | f5dc980900dfa34fb219bc80bebf17304e0264b5 (diff) |
[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
Diffstat (limited to 'Xamarin.PropertyEditing.Mac/Controls/BaseRectangleEditorControl.cs')
-rw-r--r-- | Xamarin.PropertyEditing.Mac/Controls/BaseRectangleEditorControl.cs | 6 |
1 files changed, 6 insertions, 0 deletions
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<T> ViewModel { get { return (PropertyViewModel<T>)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; |