kopia lustrzana https://github.com/shoelace-style/shoelace
Remove unused method
rodzic
3e0f174052
commit
91a023e564
|
@ -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;
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue