@github/text-expander-element
Advanced tools
Comparing version 2.2.1 to 2.2.2
@@ -355,4 +355,6 @@ const ctrlBindings = !!navigator.userAgent.match(/Macintosh/); | ||
activate(match, menu) { | ||
if (this.input !== document.activeElement) | ||
var _a, _b; | ||
if (this.input !== document.activeElement && this.input !== ((_b = (_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.shadowRoot) === null || _b === void 0 ? void 0 : _b.activeElement)) { | ||
return; | ||
} | ||
this.deactivate(); | ||
@@ -405,3 +407,5 @@ this.menu = menu; | ||
this.deactivate(); | ||
this.input.focus(); | ||
this.input.focus({ | ||
preventScroll: true | ||
}); | ||
this.input.selectionStart = cursor; | ||
@@ -408,0 +412,0 @@ this.input.selectionEnd = cursor; |
@@ -185,4 +185,6 @@ import Combobox from '@github/combobox-nav'; | ||
activate(match, menu) { | ||
if (this.input !== document.activeElement) | ||
var _a, _b; | ||
if (this.input !== document.activeElement && this.input !== ((_b = (_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.shadowRoot) === null || _b === void 0 ? void 0 : _b.activeElement)) { | ||
return; | ||
} | ||
this.deactivate(); | ||
@@ -235,3 +237,5 @@ this.menu = menu; | ||
this.deactivate(); | ||
this.input.focus(); | ||
this.input.focus({ | ||
preventScroll: true | ||
}); | ||
this.input.selectionStart = cursor; | ||
@@ -238,0 +242,0 @@ this.input.selectionEnd = cursor; |
@@ -38,4 +38,6 @@ import Combobox from '@github/combobox-nav'; | ||
activate(match, menu) { | ||
if (this.input !== document.activeElement) | ||
var _a, _b; | ||
if (this.input !== document.activeElement && this.input !== ((_b = (_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.shadowRoot) === null || _b === void 0 ? void 0 : _b.activeElement)) { | ||
return; | ||
} | ||
this.deactivate(); | ||
@@ -88,3 +90,5 @@ this.menu = menu; | ||
this.deactivate(); | ||
this.input.focus(); | ||
this.input.focus({ | ||
preventScroll: true | ||
}); | ||
this.input.selectionStart = cursor; | ||
@@ -91,0 +95,0 @@ this.input.selectionEnd = cursor; |
{ | ||
"name": "@github/text-expander-element", | ||
"version": "2.2.1", | ||
"version": "2.2.2", | ||
"description": "Activates a suggestion menu to expand text snippets as you type.", | ||
@@ -5,0 +5,0 @@ "repository": "github/text-expander-element", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
48992
1249
1