protvista-uniprot 4.6.0 → 4.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "protvista-uniprot",
3
3
  "description": "ProtVista tool for the UniProt website",
4
- "version": "4.6.0",
4
+ "version": "4.6.1",
5
5
  "files": [
6
6
  "dist",
7
7
  "src"
@@ -585,13 +585,14 @@ class ProtvistaUniprot extends LitElement {
585
585
  }
586
586
 
587
587
  handleCategoryClick(e: MouseEvent) {
588
- const target = e.target as Element;
588
+ let target = e.target as Element;
589
+
590
+ if (target instanceof HTMLSpanElement) {
591
+ target = target.parentElement as Element;
592
+ }
593
+
594
+ const toggle = target.getAttribute('data-category-toggle');
589
595
 
590
- const toggle =
591
- target.getAttribute('data-category-toggle') ||
592
- (target instanceof HTMLSpanElement &&
593
- target.parentElement?.getAttribute('data-category-toggle'));
594
-
595
596
  if (toggle && !target.classList.contains('open')) {
596
597
  target.classList.add('open');
597
598
  this.openCategories = [...this.openCategories, toggle];