@scalemule/news-publication 0.0.78 → 0.0.79

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.
@@ -78,9 +78,13 @@ function silentSignInUrl(startPath, pathname, search) {
78
78
  return `${startPath}?${new URLSearchParams({ mode: "silent", next: pathname + search })}`;
79
79
  }
80
80
  function isFormField(element) {
81
- if (!element) return false;
82
- const tag = element.tagName;
83
- return tag === "INPUT" || tag === "TEXTAREA" || tag === "SELECT" || element.isContentEditable === true;
81
+ let focused = element;
82
+ while (focused?.shadowRoot?.activeElement && focused.shadowRoot.activeElement !== focused) {
83
+ focused = focused.shadowRoot.activeElement;
84
+ }
85
+ if (!focused) return false;
86
+ const tag = focused.tagName;
87
+ return tag === "INPUT" || tag === "TEXTAREA" || tag === "SELECT" || focused.isContentEditable === true;
84
88
  }
85
89
  var ATTEMPT_KEY = "reader-sso-attempt-v1";
86
90
  function readAttempt() {
@@ -76,9 +76,13 @@ function silentSignInUrl(startPath, pathname, search) {
76
76
  return `${startPath}?${new URLSearchParams({ mode: "silent", next: pathname + search })}`;
77
77
  }
78
78
  function isFormField(element) {
79
- if (!element) return false;
80
- const tag = element.tagName;
81
- return tag === "INPUT" || tag === "TEXTAREA" || tag === "SELECT" || element.isContentEditable === true;
79
+ let focused = element;
80
+ while (focused?.shadowRoot?.activeElement && focused.shadowRoot.activeElement !== focused) {
81
+ focused = focused.shadowRoot.activeElement;
82
+ }
83
+ if (!focused) return false;
84
+ const tag = focused.tagName;
85
+ return tag === "INPUT" || tag === "TEXTAREA" || tag === "SELECT" || focused.isContentEditable === true;
82
86
  }
83
87
  var ATTEMPT_KEY = "reader-sso-attempt-v1";
84
88
  function readAttempt() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scalemule/news-publication",
3
- "version": "0.0.78",
3
+ "version": "0.0.79",
4
4
  "description": "Shared server framework for ScaleMule local news publications. Walnut Creek Times is the broadsheet default; each paper supplies its own identity and feature flags.",
5
5
  "type": "module",
6
6
  "bin": {