squiffy-runtime 6.0.0-alpha.3 → 6.0.0-alpha.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.
@@ -587,8 +587,8 @@ export const init = (options) => {
587
587
  if (settings.scroll === 'element') {
588
588
  outputElement.style.overflowY = 'auto';
589
589
  }
590
- document.addEventListener('click', handleClick);
591
- document.addEventListener('keypress', function (event) {
590
+ outputElement.addEventListener('click', handleClick);
591
+ outputElement.addEventListener('keypress', function (event) {
592
592
  if (event.key !== "Enter")
593
593
  return;
594
594
  handleClick(event);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "squiffy-runtime",
3
- "version": "6.0.0-alpha.3",
3
+ "version": "6.0.0-alpha.4",
4
4
  "main": "dist/squiffy.runtime.js",
5
5
  "types": "dist/squiffy.runtime.d.ts",
6
6
  "scripts": {
@@ -679,8 +679,8 @@ export const init = (options: SquiffyInitOptions): SquiffyApi => {
679
679
  outputElement.style.overflowY = 'auto';
680
680
  }
681
681
 
682
- document.addEventListener('click', handleClick);
683
- document.addEventListener('keypress', function (event) {
682
+ outputElement.addEventListener('click', handleClick);
683
+ outputElement.addEventListener('keypress', function (event) {
684
684
  if (event.key !== "Enter") return;
685
685
  handleClick(event);
686
686
  });