Преглед изворни кода

fix(Toolbox): Fix toolbox display when accessing it via keyboard

master
Mihai-Andrei Uscat пре 4 година
родитељ
комит
8aae2065dc
No account linked to committer's email address
1 измењених фајлова са 17 додато и 1 уклоњено
  1. 17
    1
      react/features/toolbox/components/web/Toolbox.js

+ 17
- 1
react/features/toolbox/components/web/Toolbox.js Прегледај датотеку

@@ -73,7 +73,8 @@ import {
73 73
 import {
74 74
     setFullScreen,
75 75
     setOverflowMenuVisible,
76
-    setToolbarHovered
76
+    setToolbarHovered,
77
+    setToolboxVisible
77 78
 } from '../../actions';
78 79
 import { isToolboxVisible } from '../../functions';
79 80
 import DownloadButton from '../DownloadButton';
@@ -238,6 +239,7 @@ class Toolbox extends Component<Props, State> {
238 239
         this._onMouseOver = this._onMouseOver.bind(this);
239 240
         this._onResize = this._onResize.bind(this);
240 241
         this._onSetOverflowVisible = this._onSetOverflowVisible.bind(this);
242
+        this._onTabIn = this._onTabIn.bind(this);
241 243
 
242 244
         this._onShortcutToggleChat = this._onShortcutToggleChat.bind(this);
243 245
         this._onShortcutToggleFullScreen = this._onShortcutToggleFullScreen.bind(this);
@@ -368,6 +370,7 @@ class Toolbox extends Component<Props, State> {
368 370
             <div
369 371
                 className = { rootClassNames }
370 372
                 id = 'new-toolbox'
373
+                onFocus = { this._onTabIn }
371 374
                 onMouseOut = { this._onMouseOut }
372 375
                 onMouseOver = { this._onMouseOver }>
373 376
                 <div className = 'toolbox-background' />
@@ -698,6 +701,19 @@ class Toolbox extends Component<Props, State> {
698 701
         this._doToggleScreenshare();
699 702
     }
700 703
 
704
+    _onTabIn: () => void;
705
+
706
+    /**
707
+     * Toggle the toolbar visibility when tabbing into it.
708
+     *
709
+     * @returns {void}
710
+     */
711
+    _onTabIn() {
712
+        if (!this.props._visible) {
713
+            this.props.dispatch(setToolboxVisible(true));
714
+        }
715
+    }
716
+
701 717
     _onToolbarOpenFeedback: () => void;
702 718
 
703 719
     /**

Loading…
Откажи
Сачувај