@hytopia.com/examples 1.0.21 → 1.0.23

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.
@@ -212,7 +212,7 @@
212
212
 
213
213
  // Setup click events
214
214
  hotbarSlots.forEach((slot, index) => {
215
- slot.addEventListener('click', () => setActiveSlot(index));
215
+ slot.addEventListener('pointerdown', () => setActiveSlot(index));
216
216
  });
217
217
 
218
218
  // Setup keyboard events
@@ -233,22 +233,22 @@
233
233
  };
234
234
 
235
235
  Object.entries(buttons).forEach(([id, handler]) => {
236
- document.getElementById(id).addEventListener('click', handler);
236
+ document.getElementById(id).addEventListener('pointerdown', handler);
237
237
  });
238
238
 
239
239
  // Setup death overlay respawn button
240
- document.getElementById('hud-death-respawn-btn').addEventListener('click', handleRespawn);
240
+ document.getElementById('hud-death-respawn-btn').addEventListener('pointerdown', handleRespawn);
241
241
 
242
242
  // Setup mobile buttons
243
- document.getElementById('hud-attack-btn').addEventListener('touchstart', handleAttackTap);
244
- document.getElementById('hud-attack-btn').addEventListener('touchend', stopAutoAttack);
245
- document.getElementById('hud-attack-btn').addEventListener('touchcancel', stopAutoAttack);
246
- document.getElementById('hud-dodge-btn').addEventListener('touchstart', () => hytopia.pressInput('q', true));
247
- document.getElementById('hud-dodge-btn').addEventListener('touchend', () => hytopia.pressInput('q', false));
248
- document.getElementById('hud-jump-btn').addEventListener('touchstart', () => hytopia.pressInput('sp', true));
249
- document.getElementById('hud-jump-btn').addEventListener('touchend', () => hytopia.pressInput('sp', false));
250
- document.getElementById('hud-interact-btn').addEventListener('touchstart', () => hytopia.pressInput('e', true));
251
- document.getElementById('hud-interact-btn').addEventListener('touchend', () => hytopia.pressInput('e', false));
243
+ document.getElementById('hud-attack-btn').addEventListener('pointerdown', handleAttackTap);
244
+ document.getElementById('hud-attack-btn').addEventListener('pointerup', stopAutoAttack);
245
+ document.getElementById('hud-attack-btn').addEventListener('pointercancel', stopAutoAttack);
246
+ document.getElementById('hud-dodge-btn').addEventListener('pointerdown', () => hytopia.pressInput('q', true));
247
+ document.getElementById('hud-dodge-btn').addEventListener('pointerup', () => hytopia.pressInput('q', false));
248
+ document.getElementById('hud-jump-btn').addEventListener('pointerdown', () => hytopia.pressInput('sp', true));
249
+ document.getElementById('hud-jump-btn').addEventListener('pointerup', () => hytopia.pressInput('sp', false));
250
+ document.getElementById('hud-interact-btn').addEventListener('pointerdown', () => hytopia.pressInput('e', true));
251
+ document.getElementById('hud-interact-btn').addEventListener('pointerup', () => hytopia.pressInput('e', false));
252
252
  }
253
253
 
254
254
  function updateHudQuestCount(activeCount, completedCount) {
@@ -511,7 +511,6 @@
511
511
  let autoAttackInterval = null;
512
512
  let lastTapTime = 0;
513
513
 
514
-
515
514
  function handleAttackTap() {
516
515
  const currentTime = Date.now();
517
516
 
@@ -1544,8 +1543,6 @@
1544
1543
  opacity: 1;
1545
1544
  }
1546
1545
 
1547
-
1548
-
1549
1546
  /* ============================================
1550
1547
  MOBILE RESPONSIVE
1551
1548
  ============================================ */
@@ -957,12 +957,12 @@ window.ItemTooltips = (function() {
957
957
 
958
958
  function setupEventListeners() {
959
959
  const closeButton = document.querySelector('.backpack-close');
960
- closeButton.addEventListener('click', closeBackpack);
960
+ closeButton.addEventListener('pointerdown', closeBackpack);
961
961
 
962
962
  // Setup slot click handlers
963
963
  document.querySelectorAll('.backpack-slot, .backpack-wearable-slot, .backpack-hotbar-slot')
964
964
  .forEach(slot => {
965
- slot.addEventListener('click', e => {
965
+ slot.addEventListener('pointerdown', e => {
966
966
  e.preventDefault();
967
967
  e.stopPropagation();
968
968
 
@@ -991,7 +991,7 @@ window.ItemTooltips = (function() {
991
991
  });
992
992
 
993
993
  // Setup click outside containers handler for item dropping
994
- document.addEventListener('click', e => {
994
+ document.addEventListener('pointerdown', e => {
995
995
  // Only handle if we have a held item
996
996
  if (!heldItem) return;
997
997
 
@@ -1900,7 +1900,7 @@ window.ItemTooltips = (function() {
1900
1900
 
1901
1901
  // Event Listeners
1902
1902
  function setupEventListeners() {
1903
- document.querySelector('.skills-close').addEventListener('click', closeSkills);
1903
+ document.querySelector('.skills-close').addEventListener('pointerdown', closeSkills);
1904
1904
 
1905
1905
  // Setup mobile tooltip handling
1906
1906
  setupMobileTooltips();
@@ -1913,10 +1913,10 @@ window.ItemTooltips = (function() {
1913
1913
  if (!isMobile) return;
1914
1914
 
1915
1915
  // Add click handler to skills container for event delegation
1916
- document.querySelector('.skills-skills-grid').addEventListener('click', handleMobileTooltipClick);
1916
+ document.querySelector('.skills-skills-grid').addEventListener('pointerdown', handleMobileTooltipClick);
1917
1917
 
1918
1918
  // Add click handler to document to close tooltips when clicking outside
1919
- document.addEventListener('click', handleDocumentClick);
1919
+ document.addEventListener('pointerdown', handleDocumentClick);
1920
1920
  }
1921
1921
 
1922
1922
  function handleMobileTooltipClick(e) {
@@ -2470,7 +2470,7 @@ window.ItemTooltips = (function() {
2470
2470
  optionEl.textContent = option.text;
2471
2471
  }
2472
2472
 
2473
- optionEl.addEventListener('click', () => {
2473
+ optionEl.addEventListener('pointerdown', () => {
2474
2474
  if (option.dismiss) {
2475
2475
  closeDialogue(option.pureExit);
2476
2476
  }
@@ -2520,7 +2520,7 @@ window.ItemTooltips = (function() {
2520
2520
  });
2521
2521
 
2522
2522
  // Setup close button
2523
- document.querySelector('.dialogue-close').addEventListener('click', closeDialogue);
2523
+ document.querySelector('.dialogue-close').addEventListener('pointerdown', closeDialogue);
2524
2524
  </script>
2525
2525
 
2526
2526
  <style>
@@ -2820,11 +2820,7 @@ window.ItemTooltips = (function() {
2820
2820
  body.mobile .dialogue-content {
2821
2821
  padding: 12px;
2822
2822
  max-height: calc(100vh - 140px);
2823
- }
2824
-
2825
- body.mobile .dialogue-content * {
2826
- overflow-y: scroll;
2827
-
2823
+ overflow-y: auto;
2828
2824
  }
2829
2825
 
2830
2826
  body.mobile .dialogue-message {
@@ -2846,31 +2842,38 @@ window.ItemTooltips = (function() {
2846
2842
  height: 14px;
2847
2843
  }
2848
2844
 
2849
- /* Override global touch-action: none for dialogue interactions */
2850
- body.mobile .dialogue-option,
2851
- body.mobile .dialogue-close,
2852
- body.mobile .dialogue-option *,
2853
- body.mobile .dialogue-close * {
2854
- touch-action: manipulation !important;
2855
- pointer-events: auto !important;
2856
- }
2857
-
2858
- /* Ensure dialogue containers allow touch events */
2845
+ /* AGGRESSIVE override of global touch-action: none for dialogue */
2846
+ body.mobile .dialogue-overlay,
2859
2847
  body.mobile .dialogue-panel,
2860
2848
  body.mobile .dialogue-container,
2849
+ body.mobile .dialogue-header,
2861
2850
  body.mobile .dialogue-content,
2862
- body.mobile .dialogue-options {
2851
+ body.mobile .dialogue-options,
2852
+ body.mobile .dialogue-option,
2853
+ body.mobile .dialogue-close {
2863
2854
  touch-action: manipulation !important;
2855
+ pointer-events: auto !important;
2856
+ -webkit-touch-callout: default !important;
2857
+ -webkit-user-select: auto !important;
2858
+ user-select: auto !important;
2864
2859
  }
2865
2860
 
2866
- /* Override global mobile touch rules specifically for dialogue */
2867
- body.mobile .dialogue-panel *:not(.dialogue-message) {
2861
+ /* Force touch events on all dialogue interactive elements */
2862
+ body.mobile .dialogue-option,
2863
+ body.mobile .dialogue-option *,
2864
+ body.mobile .dialogue-close,
2865
+ body.mobile .dialogue-close *,
2866
+ body.mobile .dialogue-quest-icon,
2867
+ body.mobile .dialogue-option-text {
2868
2868
  touch-action: manipulation !important;
2869
+ pointer-events: auto !important;
2870
+ cursor: pointer !important;
2869
2871
  }
2870
2872
 
2871
- /* Allow scrolling only on message content */
2873
+ /* Only allow scrolling on message content */
2872
2874
  body.mobile .dialogue-message {
2873
2875
  touch-action: pan-y !important;
2876
+ overflow-y: auto;
2874
2877
  }
2875
2878
  </style>
2876
2879
 
@@ -2949,7 +2952,7 @@ window.ItemTooltips = (function() {
2949
2952
 
2950
2953
  function setupEventListeners() {
2951
2954
  const closeButton = document.querySelector('.quests-close');
2952
- closeButton.addEventListener('click', closeQuests);
2955
+ closeButton.addEventListener('pointerdown', closeQuests);
2953
2956
  }
2954
2957
 
2955
2958
  function updateQuestData(questData) {
@@ -3046,7 +3049,7 @@ window.ItemTooltips = (function() {
3046
3049
  <div class="quests-item-progress">${progress}</div>
3047
3050
  `;
3048
3051
 
3049
- questItem.addEventListener('click', () => selectQuest(questId));
3052
+ questItem.addEventListener('pointerdown', () => selectQuest(questId));
3050
3053
  return questItem;
3051
3054
  }
3052
3055
 
@@ -4068,7 +4071,7 @@ window.ItemTooltips = (function() {
4068
4071
  // Add close button handler
4069
4072
  const closeButton = document.querySelector('.merchant-close');
4070
4073
  if (closeButton) {
4071
- closeButton.addEventListener('click', () => toggleMerchant(null));
4074
+ closeButton.addEventListener('pointerdown', () => toggleMerchant(null));
4072
4075
  }
4073
4076
  }
4074
4077
 
@@ -4380,15 +4383,15 @@ window.ItemTooltips = (function() {
4380
4383
  const confirmBtn = placeholder.querySelector('.merchant-confirm-action');
4381
4384
 
4382
4385
  if (decreaseBtn) {
4383
- decreaseBtn.addEventListener('click', () => changeQuantity(-1));
4386
+ decreaseBtn.addEventListener('pointerdown', () => changeQuantity(-1));
4384
4387
  }
4385
4388
 
4386
4389
  if (increaseBtn) {
4387
- increaseBtn.addEventListener('click', () => changeQuantity(1));
4390
+ increaseBtn.addEventListener('pointerdown', () => changeQuantity(1));
4388
4391
  }
4389
4392
 
4390
4393
  if (confirmBtn && price > 0) {
4391
- confirmBtn.addEventListener('click', confirmAction);
4394
+ confirmBtn.addEventListener('pointerdown', confirmAction);
4392
4395
  }
4393
4396
  }
4394
4397
 
@@ -5166,7 +5169,7 @@ window.ItemTooltips = (function() {
5166
5169
  // Add close button handler
5167
5170
  const closeButton = document.querySelector('.crafting-close');
5168
5171
  if (closeButton) {
5169
- closeButton.addEventListener('click', () => toggleCrafting(null));
5172
+ closeButton.addEventListener('pointerdown', () => toggleCrafting(null));
5170
5173
  }
5171
5174
  }
5172
5175
 
@@ -5436,7 +5439,7 @@ window.ItemTooltips = (function() {
5436
5439
  const confirmBtn = placeholder.querySelector('.crafting-confirm-action');
5437
5440
 
5438
5441
  if (confirmBtn) {
5439
- confirmBtn.addEventListener('click', confirmCrafting);
5442
+ confirmBtn.addEventListener('pointerdown', confirmCrafting);
5440
5443
  }
5441
5444
 
5442
5445
  // Add tooltips to requirement items
@@ -6262,7 +6265,7 @@ window.ItemTooltips = (function() {
6262
6265
 
6263
6266
  // Event Listeners
6264
6267
  function setupEventListeners() {
6265
- document.querySelector('.help-close').addEventListener('click', closeHelp);
6268
+ document.querySelector('.help-close').addEventListener('pointerdown', closeHelp);
6266
6269
  }
6267
6270
 
6268
6271
  // Initialize
@@ -7254,7 +7257,7 @@ window.ItemTooltips = (function() {
7254
7257
 
7255
7258
  // Setup click events
7256
7259
  hotbarSlots.forEach((slot, index) => {
7257
- slot.addEventListener('click', () => setActiveSlot(index));
7260
+ slot.addEventListener('pointerdown', () => setActiveSlot(index));
7258
7261
  });
7259
7262
 
7260
7263
  // Setup keyboard events
@@ -7275,22 +7278,22 @@ window.ItemTooltips = (function() {
7275
7278
  };
7276
7279
 
7277
7280
  Object.entries(buttons).forEach(([id, handler]) => {
7278
- document.getElementById(id).addEventListener('click', handler);
7281
+ document.getElementById(id).addEventListener('pointerdown', handler);
7279
7282
  });
7280
7283
 
7281
7284
  // Setup death overlay respawn button
7282
- document.getElementById('hud-death-respawn-btn').addEventListener('click', handleRespawn);
7285
+ document.getElementById('hud-death-respawn-btn').addEventListener('pointerdown', handleRespawn);
7283
7286
 
7284
7287
  // Setup mobile buttons
7285
- document.getElementById('hud-attack-btn').addEventListener('touchstart', handleAttackTap);
7286
- document.getElementById('hud-attack-btn').addEventListener('touchend', stopAutoAttack);
7287
- document.getElementById('hud-attack-btn').addEventListener('touchcancel', stopAutoAttack);
7288
- document.getElementById('hud-dodge-btn').addEventListener('touchstart', () => hytopia.pressInput('q', true));
7289
- document.getElementById('hud-dodge-btn').addEventListener('touchend', () => hytopia.pressInput('q', false));
7290
- document.getElementById('hud-jump-btn').addEventListener('touchstart', () => hytopia.pressInput('sp', true));
7291
- document.getElementById('hud-jump-btn').addEventListener('touchend', () => hytopia.pressInput('sp', false));
7292
- document.getElementById('hud-interact-btn').addEventListener('touchstart', () => hytopia.pressInput('e', true));
7293
- document.getElementById('hud-interact-btn').addEventListener('touchend', () => hytopia.pressInput('e', false));
7288
+ document.getElementById('hud-attack-btn').addEventListener('pointerdown', handleAttackTap);
7289
+ document.getElementById('hud-attack-btn').addEventListener('pointerup', stopAutoAttack);
7290
+ document.getElementById('hud-attack-btn').addEventListener('pointercancel', stopAutoAttack);
7291
+ document.getElementById('hud-dodge-btn').addEventListener('pointerdown', () => hytopia.pressInput('q', true));
7292
+ document.getElementById('hud-dodge-btn').addEventListener('pointerup', () => hytopia.pressInput('q', false));
7293
+ document.getElementById('hud-jump-btn').addEventListener('pointerdown', () => hytopia.pressInput('sp', true));
7294
+ document.getElementById('hud-jump-btn').addEventListener('pointerup', () => hytopia.pressInput('sp', false));
7295
+ document.getElementById('hud-interact-btn').addEventListener('pointerdown', () => hytopia.pressInput('e', true));
7296
+ document.getElementById('hud-interact-btn').addEventListener('pointerup', () => hytopia.pressInput('e', false));
7294
7297
  }
7295
7298
 
7296
7299
  function updateHudQuestCount(activeCount, completedCount) {
@@ -7553,7 +7556,6 @@ window.ItemTooltips = (function() {
7553
7556
  let autoAttackInterval = null;
7554
7557
  let lastTapTime = 0;
7555
7558
 
7556
-
7557
7559
  function handleAttackTap() {
7558
7560
  const currentTime = Date.now();
7559
7561
 
@@ -8586,8 +8588,6 @@ window.ItemTooltips = (function() {
8586
8588
  opacity: 1;
8587
8589
  }
8588
8590
 
8589
-
8590
-
8591
8591
  /* ============================================
8592
8592
  MOBILE RESPONSIVE
8593
8593
  ============================================ */
@@ -288,12 +288,12 @@
288
288
 
289
289
  function setupEventListeners() {
290
290
  const closeButton = document.querySelector('.backpack-close');
291
- closeButton.addEventListener('click', closeBackpack);
291
+ closeButton.addEventListener('pointerdown', closeBackpack);
292
292
 
293
293
  // Setup slot click handlers
294
294
  document.querySelectorAll('.backpack-slot, .backpack-wearable-slot, .backpack-hotbar-slot')
295
295
  .forEach(slot => {
296
- slot.addEventListener('click', e => {
296
+ slot.addEventListener('pointerdown', e => {
297
297
  e.preventDefault();
298
298
  e.stopPropagation();
299
299
 
@@ -322,7 +322,7 @@
322
322
  });
323
323
 
324
324
  // Setup click outside containers handler for item dropping
325
- document.addEventListener('click', e => {
325
+ document.addEventListener('pointerdown', e => {
326
326
  // Only handle if we have a held item
327
327
  if (!heldItem) return;
328
328
 
@@ -60,7 +60,7 @@
60
60
  // Add close button handler
61
61
  const closeButton = document.querySelector('.crafting-close');
62
62
  if (closeButton) {
63
- closeButton.addEventListener('click', () => toggleCrafting(null));
63
+ closeButton.addEventListener('pointerdown', () => toggleCrafting(null));
64
64
  }
65
65
  }
66
66
 
@@ -330,7 +330,7 @@
330
330
  const confirmBtn = placeholder.querySelector('.crafting-confirm-action');
331
331
 
332
332
  if (confirmBtn) {
333
- confirmBtn.addEventListener('click', confirmCrafting);
333
+ confirmBtn.addEventListener('pointerdown', confirmCrafting);
334
334
  }
335
335
 
336
336
  // Add tooltips to requirement items
@@ -68,7 +68,7 @@
68
68
  optionEl.textContent = option.text;
69
69
  }
70
70
 
71
- optionEl.addEventListener('click', () => {
71
+ optionEl.addEventListener('pointerdown', () => {
72
72
  if (option.dismiss) {
73
73
  closeDialogue(option.pureExit);
74
74
  }
@@ -118,7 +118,7 @@
118
118
  });
119
119
 
120
120
  // Setup close button
121
- document.querySelector('.dialogue-close').addEventListener('click', closeDialogue);
121
+ document.querySelector('.dialogue-close').addEventListener('pointerdown', closeDialogue);
122
122
  </script>
123
123
 
124
124
  <style>
@@ -418,11 +418,7 @@
418
418
  body.mobile .dialogue-content {
419
419
  padding: 12px;
420
420
  max-height: calc(100vh - 140px);
421
- }
422
-
423
- body.mobile .dialogue-content * {
424
- overflow-y: scroll;
425
-
421
+ overflow-y: auto;
426
422
  }
427
423
 
428
424
  body.mobile .dialogue-message {
@@ -444,30 +440,37 @@
444
440
  height: 14px;
445
441
  }
446
442
 
447
- /* Override global touch-action: none for dialogue interactions */
448
- body.mobile .dialogue-option,
449
- body.mobile .dialogue-close,
450
- body.mobile .dialogue-option *,
451
- body.mobile .dialogue-close * {
452
- touch-action: manipulation !important;
453
- pointer-events: auto !important;
454
- }
455
-
456
- /* Ensure dialogue containers allow touch events */
443
+ /* AGGRESSIVE override of global touch-action: none for dialogue */
444
+ body.mobile .dialogue-overlay,
457
445
  body.mobile .dialogue-panel,
458
446
  body.mobile .dialogue-container,
447
+ body.mobile .dialogue-header,
459
448
  body.mobile .dialogue-content,
460
- body.mobile .dialogue-options {
449
+ body.mobile .dialogue-options,
450
+ body.mobile .dialogue-option,
451
+ body.mobile .dialogue-close {
461
452
  touch-action: manipulation !important;
453
+ pointer-events: auto !important;
454
+ -webkit-touch-callout: default !important;
455
+ -webkit-user-select: auto !important;
456
+ user-select: auto !important;
462
457
  }
463
458
 
464
- /* Override global mobile touch rules specifically for dialogue */
465
- body.mobile .dialogue-panel *:not(.dialogue-message) {
459
+ /* Force touch events on all dialogue interactive elements */
460
+ body.mobile .dialogue-option,
461
+ body.mobile .dialogue-option *,
462
+ body.mobile .dialogue-close,
463
+ body.mobile .dialogue-close *,
464
+ body.mobile .dialogue-quest-icon,
465
+ body.mobile .dialogue-option-text {
466
466
  touch-action: manipulation !important;
467
+ pointer-events: auto !important;
468
+ cursor: pointer !important;
467
469
  }
468
470
 
469
- /* Allow scrolling only on message content */
471
+ /* Only allow scrolling on message content */
470
472
  body.mobile .dialogue-message {
471
473
  touch-action: pan-y !important;
474
+ overflow-y: auto;
472
475
  }
473
476
  </style>
@@ -155,7 +155,7 @@
155
155
 
156
156
  // Event Listeners
157
157
  function setupEventListeners() {
158
- document.querySelector('.help-close').addEventListener('click', closeHelp);
158
+ document.querySelector('.help-close').addEventListener('pointerdown', closeHelp);
159
159
  }
160
160
 
161
161
  // Initialize
@@ -85,7 +85,7 @@
85
85
  // Add close button handler
86
86
  const closeButton = document.querySelector('.merchant-close');
87
87
  if (closeButton) {
88
- closeButton.addEventListener('click', () => toggleMerchant(null));
88
+ closeButton.addEventListener('pointerdown', () => toggleMerchant(null));
89
89
  }
90
90
  }
91
91
 
@@ -397,15 +397,15 @@
397
397
  const confirmBtn = placeholder.querySelector('.merchant-confirm-action');
398
398
 
399
399
  if (decreaseBtn) {
400
- decreaseBtn.addEventListener('click', () => changeQuantity(-1));
400
+ decreaseBtn.addEventListener('pointerdown', () => changeQuantity(-1));
401
401
  }
402
402
 
403
403
  if (increaseBtn) {
404
- increaseBtn.addEventListener('click', () => changeQuantity(1));
404
+ increaseBtn.addEventListener('pointerdown', () => changeQuantity(1));
405
405
  }
406
406
 
407
407
  if (confirmBtn && price > 0) {
408
- confirmBtn.addEventListener('click', confirmAction);
408
+ confirmBtn.addEventListener('pointerdown', confirmAction);
409
409
  }
410
410
  }
411
411
 
@@ -72,7 +72,7 @@
72
72
 
73
73
  function setupEventListeners() {
74
74
  const closeButton = document.querySelector('.quests-close');
75
- closeButton.addEventListener('click', closeQuests);
75
+ closeButton.addEventListener('pointerdown', closeQuests);
76
76
  }
77
77
 
78
78
  function updateQuestData(questData) {
@@ -169,7 +169,7 @@
169
169
  <div class="quests-item-progress">${progress}</div>
170
170
  `;
171
171
 
172
- questItem.addEventListener('click', () => selectQuest(questId));
172
+ questItem.addEventListener('pointerdown', () => selectQuest(questId));
173
173
  return questItem;
174
174
  }
175
175
 
@@ -179,7 +179,7 @@
179
179
 
180
180
  // Event Listeners
181
181
  function setupEventListeners() {
182
- document.querySelector('.skills-close').addEventListener('click', closeSkills);
182
+ document.querySelector('.skills-close').addEventListener('pointerdown', closeSkills);
183
183
 
184
184
  // Setup mobile tooltip handling
185
185
  setupMobileTooltips();
@@ -192,10 +192,10 @@
192
192
  if (!isMobile) return;
193
193
 
194
194
  // Add click handler to skills container for event delegation
195
- document.querySelector('.skills-skills-grid').addEventListener('click', handleMobileTooltipClick);
195
+ document.querySelector('.skills-skills-grid').addEventListener('pointerdown', handleMobileTooltipClick);
196
196
 
197
197
  // Add click handler to document to close tooltips when clicking outside
198
- document.addEventListener('click', handleDocumentClick);
198
+ document.addEventListener('pointerdown', handleDocumentClick);
199
199
  }
200
200
 
201
201
  function handleMobileTooltipClick(e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hytopia.com/examples",
3
- "version": "1.0.21",
3
+ "version": "1.0.23",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "author": "",