Skip to content

Commit e9eeaa9

Browse files
committed
Fix popup not showing above again
1 parent 88a7b62 commit e9eeaa9

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

html/build/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"src": "html/fonts/glyphicons-halflings-regular.woff2"
2121
},
2222
"resources/js/app.js": {
23-
"file": "assets/app-B5UucghY.js",
23+
"file": "assets/app-DQHokxad.js",
2424
"name": "app",
2525
"src": "resources/js/app.js",
2626
"isEntry": true,

resources/js/components/alpine/popup.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export default function popup(url = '', options = {}) {
5252
this.popupElement = document.createElement('div');
5353
// this.popupElement.className = 'tw:hidden tw:bg-white tw:dark:bg-dark-gray-300 tw:dark:text-white tw:border-2 tw:border-gray-200 tw:dark:border-dark-gray-200 tw:z-50 tw:font-normal tw:leading-normal tw:text-sm tw:text-left tw:no-underline tw:rounded-lg tw:absolute tw:shadow-lg tw:max-w-sm';
5454
this.popupElement.className = 'tw:hidden';
55-
this.popupElement.style.cssText = 'max-width: 95vw; z-index: 9999;';
55+
this.popupElement.style.cssText = 'position: fixed; max-width: 95vw; z-index: 9999;';
5656

5757
// Add mouse events to popup
5858
this.popupElement.addEventListener('mouseenter', () => {
@@ -280,7 +280,7 @@ export default function popup(url = '', options = {}) {
280280
left = window.innerWidth - popupRect.width - 8;
281281
}
282282

283-
this.popupElement.style.top = `${top + window.scrollY}px`;
283+
this.popupElement.style.top = `${top}px`;
284284
this.popupElement.style.left = `${left}px`;
285285
},
286286

resources/views/components/popup.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div {{ $attributes->merge(['class' => 'tw:inline-block']) }}
1+
<div {{ $attributes->merge(['class' => 'tw:inline-block tw:relative']) }}
22
x-data="popup('', { showDelay: {{ $attributes->get('show-delay', 100) }}, hideDelay: {{ $attributes->get('hide-delay', 300) }} })"
33
x-on:click.away="hide(0)"
44
x-on:librenms-popup-shown.window="() => hide(0)"

0 commit comments

Comments
 (0)