From 91a023e564103280198f51bc89d8a2a9273ec274 Mon Sep 17 00:00:00 2001 From: Cory LaViska Date: Fri, 24 Jul 2020 09:27:11 -0400 Subject: [PATCH] Remove unused method --- src/components/color-picker/color-picker.tsx | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/components/color-picker/color-picker.tsx b/src/components/color-picker/color-picker.tsx index 63636dbec..a86366a2c 100644 --- a/src/components/color-picker/color-picker.tsx +++ b/src/components/color-picker/color-picker.tsx @@ -131,7 +131,6 @@ export class ColorPicker { this.handleAlphaInput = this.handleAlphaInput.bind(this); this.handleAlphaKeyDown = this.handleAlphaKeyDown.bind(this); this.handleCopy = this.handleCopy.bind(this); - this.handleDocumentKeyDown = this.handleDocumentKeyDown.bind(this); this.handleDocumentMouseDown = this.handleDocumentMouseDown.bind(this); this.handleDrag = this.handleDrag.bind(this); this.handleDropdownAfterHide = this.handleDropdownAfterHide.bind(this); @@ -362,22 +361,6 @@ export class ColorPicker { } } - handleDocumentKeyDown(event: KeyboardEvent) { - // Close when pressing escape or tab - if (event.key === 'Escape') { - this.dropdown.hide(); - } - - // Close when tabbing out of the color picker - if (event.key === 'Tab') { - setTimeout(() => { - if (document.activeElement && document.activeElement.closest('sl-color-picker') !== this.host) { - this.dropdown.hide(); - } - }); - } - } - handleDocumentMouseDown(event: MouseEvent) { const target = event.target as HTMLElement;