Sha256: e4ee53ee857434cf740030720b226ce4da0abde3344dc37bc41bcf07218b97cf

Contents?: true

Size: 538 Bytes

Versions: 38

Compression:

Stored size: 538 Bytes

Contents

document.addEventListener("turbo:load", () => {
  if (window.ontouchstart !== undefined) {
    document.body.classList.add("touch");
  } else {
    document.body.classList.add("no-touch");
  }
});

document.addEventListener("focusin", (event) => {
  const input = event.target as HTMLElement;
  if (input.tagName === "INPUT" || input.tagName === "TEXTAREA") {
    document.body.classList.add("keyboard-visible");
  }
});

document.addEventListener("focusout", () => {
  document.body.classList.remove("keyboard-visible");
});

export {};

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
shimmer-0.0.41 src/touch.ts
shimmer-0.0.40 src/touch.ts
shimmer-0.0.39 src/touch.ts
shimmer-0.0.38 src/touch.ts
shimmer-0.0.37 src/touch.ts
shimmer-0.0.36 src/touch.ts
shimmer-0.0.35 src/touch.ts
shimmer-0.0.34 src/touch.ts
shimmer-0.0.33 src/touch.ts
shimmer-0.0.32 src/touch.ts
shimmer-0.0.31 src/touch.ts
shimmer-0.0.30 src/touch.ts
shimmer-0.0.29 src/touch.ts
shimmer-0.0.28 src/touch.ts
shimmer-0.0.27 src/touch.ts
shimmer-0.0.26 src/touch.ts
shimmer-0.0.25 src/touch.ts
shimmer-0.0.24 src/touch.ts
shimmer-0.0.23 src/touch.ts
shimmer-0.0.22 src/touch.ts