@fluentui-react-native/focus-zone 0.9.17 → 0.9.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.json CHANGED
@@ -2,7 +2,22 @@
2
2
  "name": "@fluentui-react-native/focus-zone",
3
3
  "entries": [
4
4
  {
5
- "date": "Tue, 12 Apr 2022 00:34:43 GMT",
5
+ "date": "Tue, 12 Apr 2022 21:52:38 GMT",
6
+ "tag": "@fluentui-react-native/focus-zone_v0.9.18",
7
+ "version": "0.9.18",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "sanajmi@microsoft.com",
12
+ "package": "@fluentui-react-native/focus-zone",
13
+ "commit": "86b38c2e20e29fb4248bfd64e534da45deb35dfa",
14
+ "comment": "Scroll scrollView when Focus moves out of viewport"
15
+ }
16
+ ]
17
+ }
18
+ },
19
+ {
20
+ "date": "Tue, 12 Apr 2022 00:35:08 GMT",
6
21
  "tag": "@fluentui-react-native/focus-zone_v0.9.17",
7
22
  "version": "0.9.17",
8
23
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,20 @@
1
1
  # Change Log - @fluentui-react-native/focus-zone
2
2
 
3
- This log was last generated on Tue, 12 Apr 2022 00:34:43 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 12 Apr 2022 21:52:38 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 0.9.18
8
+
9
+ Tue, 12 Apr 2022 21:52:38 GMT
10
+
11
+ ### Patches
12
+
13
+ - Scroll scrollView when Focus moves out of viewport (sanajmi@microsoft.com)
14
+
7
15
  ## 0.9.17
8
16
 
9
- Tue, 12 Apr 2022 00:34:43 GMT
17
+ Tue, 12 Apr 2022 00:35:08 GMT
10
18
 
11
19
  ### Patches
12
20
 
@@ -168,18 +168,19 @@ static RCTFocusZone *GetFocusZoneAncestor(NSView *view)
168
168
  /// Bypass FocusZone if it's empty or has no focusable elements
169
169
  static BOOL ShouldSkipFocusZone(NSView *view)
170
170
  {
171
- if([view isKindOfClass:[RCTFocusZone class]])
172
- {
173
- NSView *keyView = GetFirstKeyViewWithin(view);
174
- // FocusZone is empty or has no focusable elements
175
- if (keyView == nil)
176
- {
177
- return YES;
178
- }
179
- }
171
+ if([view isKindOfClass:[RCTFocusZone class]])
172
+ {
173
+ NSView *keyView = GetFirstKeyViewWithin(view);
174
+ // FocusZone is empty or has no focusable elements
175
+ if (keyView == nil)
176
+ {
177
+ return YES;
178
+ }
179
+ }
180
180
 
181
- return NO;
181
+ return NO;
182
182
  }
183
+
183
184
  /// Accept firstResponder on FocusZone itself in order to reassign it within the FocusZone.
184
185
  - (BOOL)acceptsFirstResponder
185
186
  {
@@ -434,6 +435,7 @@ static BOOL ShouldSkipFocusZone(NSView *view)
434
435
  if (!passthrough && viewToFocus != nil)
435
436
  {
436
437
  [[self window] makeFirstResponder:viewToFocus];
438
+ [viewToFocus scrollRectToVisible:[viewToFocus bounds]];
437
439
  }
438
440
  else
439
441
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui-react-native/focus-zone",
3
- "version": "0.9.17",
3
+ "version": "0.9.18",
4
4
  "description": "A cross-platform FocusZone component using the Fluent Design System",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",