@lion/overlays
Advanced tools
Comparing version 0.21.0 to 0.21.1
# Change Log | ||
## 0.21.1 | ||
### Patch Changes | ||
- bdf1cfb2: When closing an overlays we check if the active element is/was within the overalys content. If so we blur it to make sure the focus returns to the body. | ||
- Updated dependencies [e92b98a4] | ||
- @lion/core@0.13.1 | ||
## 0.21.0 | ||
@@ -4,0 +12,0 @@ |
{ | ||
"name": "@lion/overlays", | ||
"version": "0.21.0", | ||
"version": "0.21.1", | ||
"description": "Overlays System using lit-html for rendering", | ||
@@ -26,5 +26,7 @@ "license": "MIT", | ||
"scripts": { | ||
"debug": "cd ../../ && yarn debug --group overlays", | ||
"debug:firefox": "cd ../../ && yarn debug:firefox --group overlays", | ||
"debug:webkit": "cd ../../ && yarn debug:webkit --group overlays", | ||
"prepublishOnly": "../../scripts/npm-prepublish.js", | ||
"test": "cd ../../ && yarn test:browser --grep \"packages/overlays/test/**/*.test.js\"", | ||
"test:watch": "cd ../../ && yarn test:browser:watch --grep \"packages/overlays/test/**/*.test.js\"" | ||
"test": "cd ../../ && yarn test:browser --group overlays" | ||
}, | ||
@@ -36,3 +38,3 @@ "sideEffects": [ | ||
"dependencies": { | ||
"@lion/core": "0.13.0", | ||
"@lion/core": "0.13.1", | ||
"popper.js": "^1.15.0", | ||
@@ -39,0 +41,0 @@ "singleton-manager": "1.1.2" |
@@ -850,2 +850,7 @@ import '@lion/core/src/differentKeyEventNamesShimIE.js'; | ||
this.elementToFocusAfterHide.focus(); | ||
} else if ( | ||
document.activeElement && | ||
this.__contentWrapperNode?.contains(document.activeElement) | ||
) { | ||
/** @type {HTMLElement} */ (document.activeElement).blur(); | ||
} | ||
@@ -852,0 +857,0 @@ } |
/* eslint-disable no-new */ | ||
import '@lion/core/test-helpers/keyboardEventShimIE.js'; | ||
import { | ||
aTimeout, | ||
defineCE, | ||
expect, | ||
fixture, | ||
html, | ||
nextFrame, | ||
unsafeStatic, | ||
} from '@open-wc/testing'; | ||
import { aTimeout, defineCE, expect, fixture, html, unsafeStatic } from '@open-wc/testing'; | ||
import { fixtureSync } from '@open-wc/testing-helpers'; | ||
@@ -679,3 +671,2 @@ import sinon from 'sinon'; | ||
await ctrl.hide(); | ||
await nextFrame(); // moving focus to body takes time? | ||
expect(document.activeElement).to.equal(document.body); | ||
@@ -682,0 +673,0 @@ }); |
303278
6001
+ Added@lion/core@0.13.1(transitive)
- Removed@lion/core@0.13.0(transitive)
Updated@lion/core@0.13.1