@ivanbard/dd2l 0.1.1 → 0.1.2

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/ui/canvas.js +6 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ivanbard/dd2l",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "A local, read-only student companion for Queen's onQ: sync coursework, search sources, and optionally connect ChatGPT.",
5
5
  "license": "MIT",
6
6
  "repository": {
package/ui/canvas.js CHANGED
@@ -64,8 +64,12 @@ export function createCanvas(target, report) {
64
64
  }
65
65
  } else if (data.type === 'ready') {
66
66
  frame.inert = false;
67
- frame.focus({ preventScroll: true });
68
- frame.dataset.ready = 'true';
67
+ // Let Chrome update iframe input routing after removing inert.
68
+ requestAnimationFrame(() => requestAnimationFrame(() => {
69
+ if (generation !== current || frame.inert) return;
70
+ frame.focus({ preventScroll: true });
71
+ frame.dataset.ready = 'true';
72
+ }));
69
73
  }
70
74
  else if (data.type === 'height' && Number.isFinite(data.height)) frame.style.height = `${Math.min(1600, Math.max(360, data.height))}px`;
71
75
  else if (data.type === 'error' && typeof data.message === 'string') {