@asamuzakjp/dom-selector 6.5.2 → 6.5.4

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.
@@ -3249,7 +3249,7 @@ var Finder = class {
3249
3249
  } else {
3250
3250
  let cacheable = true;
3251
3251
  const formKeys = [...KEY_FORM_FOCUS, "fieldset", "form"];
3252
- const pseudoKeys = ["any-link", "defined", "dir", "link"];
3252
+ const pseudoKeys = ["any-link", "defined", "dir", "link", "scope"];
3253
3253
  if (node.nodeType === ELEMENT_NODE && formKeys.includes(node.localName)) {
3254
3254
  cacheable = false;
3255
3255
  }
@@ -3824,10 +3824,15 @@ var Finder = class {
3824
3824
  dir = DIR_NEXT;
3825
3825
  twig = firstTwig;
3826
3826
  } else if (branchLen === 2) {
3827
- const { name: comboName } = firstCombo;
3828
- if (comboName === "+" || comboName === "~") {
3827
+ if (targetType === TARGET_FIRST) {
3829
3828
  dir = DIR_PREV;
3830
3829
  twig = lastTwig;
3830
+ } else {
3831
+ const { name: comboName } = firstCombo;
3832
+ if (comboName === "+" || comboName === "~") {
3833
+ dir = DIR_PREV;
3834
+ twig = lastTwig;
3835
+ }
3831
3836
  }
3832
3837
  }
3833
3838
  } else {