I’m trying to add a notification icon to the top right corner of my Glide app, aligned with the existing sidebar menu icon on the left. However, when I align the notification icon to the same position as the sidebar menu icon, it becomes non-clickable.
Here’s what I’ve tried so far:
• Aligning the notification icon using Glide’s design options.
• Ensuring there’s no overlapping element or container in the area.
I suspect the issue might be related to how Glide handles alignment or touch areas for these icons.
Has anyone encountered this before? Any tips on how to ensure both the sidebar menu icon and the notification icon are clickable when aligned at the top of the page?
I did Z-index too. It did went up but the issue is that it becomes non clickable. Only when I move it lower, it becomes clickable. Somehow, it is colliding with the sidebar menu icon.
The following CSS method changes the header from 3 columns to 2 columns while also reducing the total width by 56px so you can insert your own button. Here, I assume you’re using the block button component from Glide, and it’s only for mobile view.
Use a container to wrap the button and give it a class name (notif-container).
Apologies, I didn’t notice that earlier. Besides changing the position to sticky, it turns out that after reducing the width of the header, there is still a second layer used as the background for the header. This layer is a scrollable element located under a different parent in the DOM, specifically #main-root [data-testid="wire-container"]:first-child.
I have revised the script above accordingly. Thank you for your input.
Okay, it seems like we can’t rely on the background behavior of the scroll screen. So it would be better to wrap the button component with a container (notif-container) so that it can have its own background to insert into the reduced-width tab navigation. I revised the code in only one place so that it doesn’t cause errors in the future.