nodebb-plugin-pdf-secure 1.2.22 → 1.2.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/static/viewer.html +23 -9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-pdf-secure",
3
- "version": "1.2.22",
3
+ "version": "1.2.23",
4
4
  "description": "Secure PDF viewer plugin for NodeBB - prevents downloading, enables canvas-only rendering with Premium group support",
5
5
  "main": "library.js",
6
6
  "repository": {
@@ -1187,7 +1187,7 @@
1187
1187
  height: calc(var(--bottom-bar-height) + var(--safe-area-bottom));
1188
1188
  background: var(--bg-secondary);
1189
1189
  border-top: 1px solid var(--border-color);
1190
- z-index: 100;
1190
+ z-index: 260; /* Above backdrop (250) so dropdowns inside are clickable */
1191
1191
  padding: 0 8px;
1192
1192
  padding-bottom: var(--safe-area-bottom);
1193
1193
  /* Flex layout: scrollable tools + fixed fullscreen button */
@@ -1381,13 +1381,15 @@
1381
1381
  /* ==========================================
1382
1382
  FULLSCREEN STATE (simulated fullscreen on mobile)
1383
1383
  ========================================== */
1384
- /* Ensure bottom toolbar is visible and viewer container makes room for it */
1385
- body.viewer-fullscreen #bottomToolbar {
1386
- display: flex;
1387
- }
1384
+ /* Ensure bottom toolbar + viewerContainer adjust in fullscreen on mobile/tablet only */
1385
+ @media (max-width: 1024px) {
1386
+ body.viewer-fullscreen #bottomToolbar {
1387
+ display: flex;
1388
+ }
1388
1389
 
1389
- body.viewer-fullscreen #viewerContainer {
1390
- bottom: calc(var(--bottom-bar-height) + var(--safe-area-bottom));
1390
+ body.viewer-fullscreen #viewerContainer {
1391
+ bottom: calc(var(--bottom-bar-height) + var(--safe-area-bottom));
1392
+ }
1391
1393
  }
1392
1394
 
1393
1395
  /* ==========================================
@@ -2658,10 +2660,13 @@
2658
2660
  function closeAllDropdowns() {
2659
2661
  // Clean up swipe listeners
2660
2662
  if (swipeAbortController) { swipeAbortController.abort(); swipeAbortController = null; }
2661
- // Reset inline transform from swipe gesture
2663
+ // Reset inline transform and fixed positioning from dropdown
2662
2664
  [highlightDropdown, drawDropdown, shapesDropdown, overflowDropdown].forEach(dd => {
2663
2665
  dd.style.transform = '';
2664
2666
  dd.style.transition = '';
2667
+ dd.style.position = '';
2668
+ dd.style.top = '';
2669
+ dd.style.left = '';
2665
2670
  });
2666
2671
  highlightDropdown.classList.remove('visible');
2667
2672
  drawDropdown.classList.remove('visible');
@@ -2683,10 +2688,19 @@
2683
2688
  dropdown.insertBefore(handle, dropdown.firstChild);
2684
2689
  }
2685
2690
  dropdown.classList.add('visible');
2686
- // Show backdrop on mobile/tablet portrait
2687
2691
  if (useBottomSheet) {
2692
+ // Show backdrop on mobile/tablet portrait
2688
2693
  dropdownBackdrop.classList.add('visible');
2689
2694
  setupBottomSheetSwipe(dropdown);
2695
+ } else {
2696
+ // Desktop/tablet landscape: use fixed positioning to escape toolbar overflow clipping
2697
+ const wrapper = e.target.closest('.toolbarBtnWithDropdown');
2698
+ if (wrapper) {
2699
+ const rect = wrapper.getBoundingClientRect();
2700
+ dropdown.style.position = 'fixed';
2701
+ dropdown.style.top = (rect.bottom + 4) + 'px';
2702
+ dropdown.style.left = rect.left + 'px';
2703
+ }
2690
2704
  }
2691
2705
  }
2692
2706
  }