Lädt...


🔧 Fixing the overflow hidden for dropdowns/tooltips etc


Nachrichtenbereich: 🔧 Programmierung
🔗 Quelle: dev.to

Have you ever tried to create a dropdown for your button, select but then getting blocked by overflow hidden?

Then what do you do, well then you reach for javascript to throw the element to the root of the DOM and then position the element based on the trigger elements rect, recalulating everytime layout changes, scrolling og resize window happens, not very effective.

I wanna start by saying it dosn't have full support yet, but there is a polyfill to solve that for now.

The two main features we're gonna rely on are

anchor-positioning

anchor positioning compatability matrix

popovers

popover compatability matrix

So my initial idea came when I saw the dialog are sent to the root but with DOM layer. I stumpled across the popover api where you basically get the same logic but just acts slightly different.

I also remember seeing a post about anchoring an element to a thumb on a range slider.

Then i thought basically what you wanna do for any dropdown/tooltip etc that needs to break overflow hidden if you mix the two you didn't need all the excessive javascript.

So here is a working demo in the browsers that support it

  • Chrome, Edge v125+
  • Opera v111+
  • Chrome for Andriod, Andriod browser v129+

Okay so what if you wanna use it today. Well there is a polyfill for that that we can use.

The oddbird/css-anchor-positioning polyfill

Which has great Browser Support

  • Firefox 54+
  • Chrome 51+
  • Edge 79+
  • Safari 10+

Try visiting a browser not mentioned in the non polyfill example and this example below works, I have personally tested the latest versions of safari and firefox

This means that yes in most browsers we're going to have the extra computed overhead but its easy to use and toggle off when we have sufficient compatability.

...

🔧 Fixing the overflow hidden for dropdowns/tooltips etc


📈 89.17 Punkte
🔧 Programmierung

🔧 How to disable the display of abbreviated tooltips. Customized tooltips do not need to be displayed again


📈 49.75 Punkte
🔧 Programmierung

🔧 Có thể bạn chưa biết (Phần 1)


📈 34.7 Punkte
🔧 Programmierung

🔧 Tìm Hiểu Về RAG: Công Nghệ Đột Phá Đang "Làm Mưa Làm Gió" Trong Thế Giới Chatbot


📈 34.7 Punkte
🔧 Programmierung

📰 Google Drive: Neue Suchfunktion für die Android-App kommt – Karussells werden durch Dropdowns ersetzt


📈 26.52 Punkte
📰 IT Nachrichten

🪟 Excel-Dropdowns: So funktionieren sie optimal!


📈 26.52 Punkte
🪟 Windows Tipps

🔧 Say Goodbye to Boring Dropdowns: Create Custom Dropdown Menus with Headless UI


📈 26.52 Punkte
🔧 Programmierung

🔧 Bootstrap 5 Dropdowns Menu content Forms


📈 26.52 Punkte
🔧 Programmierung

🔧 Bootstrap 5 Dropdowns Menu content Headers


📈 26.52 Punkte
🔧 Programmierung

🔧 Demystifying Disappearing Dropdowns: A Chrome Developer's Guide to Inspecting Volatile UI Elements


📈 26.52 Punkte
🔧 Programmierung

🔧 Bootstrap: Customizing Dropdowns


📈 26.52 Punkte
🔧 Programmierung

🔧 Bootstrap: Customizing Dropdowns


📈 26.52 Punkte
🔧 Programmierung

🔧 Smart Dropdowns in React: Using useReducer and useRef for Outside Click Handling


📈 26.52 Punkte
🔧 Programmierung

🔧 Building a Custom Calculator with Dropdowns to Boost User Engagement on WordPress


📈 26.52 Punkte
🔧 Programmierung

🔧 Einfach und schnell Tooltips erstellen


📈 24.87 Punkte
🔧 Programmierung

🔧 Create tooltips quickly and easily


📈 24.87 Punkte
🔧 Programmierung

🕵️ CVE-2024-31285 | Tooltips Plugin up to 9.5.3 on WordPress cross-site request forgery


📈 24.87 Punkte
🕵️ Sicherheitslücken

🔧 Modern CSS Tooltips And Speech Bubbles (Part 2)


📈 24.87 Punkte
🔧 Programmierung

🔧 Modern CSS Tooltips And Speech Bubbles (Part 1)


📈 24.87 Punkte
🔧 Programmierung

🎥 Thinking on ways to solve TOOLTIPS


📈 24.87 Punkte
🎥 Video | Youtube

🐧 This week in KDE: Expandable tooltips and more


📈 24.87 Punkte
🐧 Linux Tipps

🐧 Eclipse - Tooltips black text on black backgroups


📈 24.87 Punkte
🐧 Linux Tipps

📰 How to Enable Dark Tooltips in Microsoft Edge Browser on Windows 10


📈 24.87 Punkte
📰 IT Security Nachrichten

🕵️ Tooltipy (tooltips for WP) <= 5.0 - Unauthenticated Cross-Site Scripting (XSS)


📈 24.87 Punkte
🕵️ Sicherheitslücken

🕵️ Tooltipy (tooltips for WP) <= 5.0 - Cross-Site Request Forgery (CSRF)


📈 24.87 Punkte
🕵️ Sicherheitslücken

🔧 Bootstrap: Customizing Tooltips


📈 24.87 Punkte
🔧 Programmierung

🔧 How to Use Tooltips in Jetpack Compose


📈 24.87 Punkte
🔧 Programmierung

🔧 Master Modal, Tooltips and more with React createPortal


📈 24.87 Punkte
🔧 Programmierung

🐧 What is an alternative to creating /etc/sysconfig/dropbox if /etc/sysconfig doesn't exist?


📈 21.41 Punkte
🐧 Linux Tipps

💾 Linux/x86 chmod 666 /etc/passwd / /etc/shadow Shellcode


📈 21.41 Punkte
💾 IT Security Tools

📰 Linux/x86 chmod 666 /etc/passwd / /etc/shadow Shellcode


📈 21.41 Punkte
🐧 Unix Server

⚠️ #0daytoday #Linux/x86 - chmod 666 /etc/passwd &amp;amp; chmod 666 /etc/shadow #Shellcode (61 by [#0day #Exploit]


📈 21.41 Punkte
⚠️ PoC

📰 DDoS sueball, felonious fonts, leaky Android file manager, blundering building security, etc etc


📈 21.41 Punkte
📰 IT Security Nachrichten

matomo