Skip to content

Commit ca091e2

Browse files
committed
move comment, add one
1 parent 2b61214 commit ca091e2

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/vs/workbench/services/hover/browser/hover.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ export interface IHoverOptions {
145145
* Whether to trap focus in the following ways:
146146
* - When the hover closes, focus goes to the element that had focus before the hover opened
147147
* - If there are elements in the hover to focus, focus stays inside of the hover when tabbing
148+
* Note that this is overridden to true when in screen reader optimized mode.
148149
*/
149150
trapFocus?: boolean;
150151

src/vs/workbench/services/hover/browser/hoverService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ export class HoverService implements IHoverService {
4444
}
4545
this._currentHoverOptions = options;
4646
this._lastHoverOptions = options;
47-
// HACK, remove when #189076 is fixed
4847
const trapFocus = options.trapFocus || this._accessibilityService.isScreenReaderOptimized();
48+
// HACK, remove this check when #189076 is fixed
4949
if (!skipLastFocusedUpdate) {
5050
if (trapFocus && document.activeElement) {
5151
this._lastFocusedElementBeforeOpen = document.activeElement as HTMLElement;

0 commit comments

Comments
 (0)