Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Border Intermittently Appears Around Popup Content Section #615

Open
4 tasks done
smartqasa opened this issue Jul 21, 2023 · 51 comments
Open
4 tasks done

Border Intermittently Appears Around Popup Content Section #615

smartqasa opened this issue Jul 21, 2023 · 51 comments
Labels

Comments

@smartqasa
Copy link

smartqasa commented Jul 21, 2023

Home Assistant 2023.7.2
Supervisor 2023.07.1
Operating System 10.3
Frontend 20230705.1 - latest

When calling browser_mod.popup, an unwanted border appears around content but then disappears as soon as any part of the screen is touched or clicked. Best shown with video... https://drive.google.com/file/d/1FEoDnfAHC_t2imiUJbABQVgc9HYr_Le7/view?usp=sharing

The border only shows up when a popup is initially called. Once you touch any part of the screen it disappears. In dark mode the border is white and black in light mode. I believe it may have to do with the styling of the 'content' class (https://drive.google.com/file/d/1JICXklRsgKs5EPizV5kyhnu9UPu__O2C/view?usp=sharing).

The issue first began after the last update (2.3.0) and occurs when using Chrome and Fully Kiosk.

I have eliminated most elements of the theming, i.e., --divider-color and border color. I set them all to transparent and the problem persists.

  • Understand that this is a channel for reporting bugs, not a support forum (https://community.home-assistant.io/).

  • Have made sure I am using the latest version of the plugin.

  • Have followed the troubleshooting steps of the "Common Problems" section of https://github.com/thomasloven/hass-config/wiki/Lovelace-Plugins.

  • Understand that leaving one or more boxes unticked or failure to follow the template above may increase the time required to handle my bug-report, or cause it to be closed without further action.

@chertvl
Copy link

chertvl commented Jul 21, 2023

Same here when calling fire-dom-event method.
image

@chertvl
Copy link

chertvl commented Jul 21, 2023

I believe it may have to do with the styling of the 'content' class

You are right, its 'content' div.
If I add "outline: none" for that div, it dissapears.
But I dont have success with card-mod to add that string here.

image

@xZetsubou
Copy link

Workaround: in your theme yaml
modify card-mod-more-info-yaml

  card-mod-theme: theme_name

  card-mod-more-info-yaml: |
      ha-dialog > div { 
        outline: none !important;
      }

@smartqasa
Copy link
Author

Thank you xZetsubou!!

@AndyVRD
Copy link

AndyVRD commented Jul 26, 2023

  card-mod-more-info-yaml: |
      ha-dialog > div { 
        outline: none !important;
      }

Hi,

Any idea why this is not working? I still get the borders (black...) around my popups.

    card-mod-more-info-yaml: |
      ha-header-bar$: |
        header {
          background: var(--card-background-color) !important;
          border-bottom: none;
        }
      ha-dialog > div { 
        outline: none !important;
        }
  
    card-mod-theme: "minimalist-desktop"

@chertvl
Copy link

chertvl commented Jul 26, 2023

  card-mod-more-info-yaml: |
      ha-dialog > div { 
        outline: none !important;
      }

Hi,

Any idea why this is not working? I still get the borders (black...) around my popups.

Better to add this 3 strings in browsermod.js file (in config/custom_components/browsermod/ folder)
and clear your browser cache for page:

8bfa091

@xZetsubou
Copy link

Hi,

Any idea why this is not working? I still get the borders (black...) around my popups.

When u make changes to theme u need to clear the cache for the browser, do hard reload CTRL+F5
better way to make sure everything reloaded try browser incognito mode.

@AndyVRD
Copy link

AndyVRD commented Jul 27, 2023

@chertvl Thanks works like a charm.

@xZetsubou Yep i did a F12 (Dev Tools) + right mouse click on the reload icon (Remove cache and force reload) but it was not working for some reason.

@smartqasa
Copy link
Author

Here is the procedure that brought me success:

  1. Edit browser_mod.js to include the 3 lines referenced above 8bfa091
  2. Delete browser_mod.js.gz
  3. Delete the Browser Mod (from the Integration dashboard).
  4. Restart Home Assistant
  5. Reinstall the Browser Mod (from the Integration dashboard).
  6. Clear cache on my browsers (including any Fully Kiosk browsers).

There may be an unnecessary step or two in all of that but it worked for me.

@xZetsubou
Copy link

xZetsubou commented Jul 27, 2023

Here is the procedure that brought me success:

  1. Edit browser_mod.js to include the 3 lines referenced above 8bfa091
  2. Delete browser_mod.js.gz
  3. Delete the Browser Mod (from the Integration dashboard).
  4. Restart Home Assistant
  5. Reinstall the Browser Mod (from the Integration dashboard).
  6. Clear cache on my browsers (including any Fully Kiosk browsers).

There may be an unnecessary step or two in all of that but it worked for me.

Actually you could use 7-zip to open browser_mod.js.gz then modify browser_mod.js to whatever you want,
after finish editing .js file drag browser_mod.js into the opened window of 7-zip.
or archive js file with 7-zip to gzip rather then drag and drop

@smartqasa
Copy link
Author

Thank you. I am not familiar with the function of the .gz files or why they are necessary.

@pickonedev
Copy link

@chertvl Thanks works like a charm.

@xZetsubou Yep i did a F12 (Dev Tools) + right mouse click on the reload icon (Remove cache and force reload) but it was not working for some reason.

Can you explain better what I need to do for this to work? I get border as well, for popups...

@pickonedev
Copy link

pickonedev commented Aug 16, 2023

  card-mod-more-info-yaml: |
      ha-dialog > div { 
        outline: none !important;
      }

Hi,

Any idea why this is not working? I still get the borders (black...) around my popups.

    card-mod-more-info-yaml: |
      ha-header-bar$: |
        header {
          background: var(--card-background-color) !important;
          border-bottom: none;
        }
      ha-dialog > div { 
        outline: none !important;
        }
  
    card-mod-theme: "minimalist-desktop"

@AndyVRD This is what i've done and it is working

  card-mod-more-info-yaml: |
    .: |
      ha-dialog {
        --vertical-align-dialog: center !important;
      }
      .container, .content{outline: none !important;}

But still... this thing with card_mod does NOT have consistency. Sometime it is working, sometime it is not...

Any idea how to make this with full consistency?

@xZetsubou
Copy link

xZetsubou commented Aug 16, 2023

Any idea how to make this with full consistency?

@pickonedev

Are u sure you specified the correct theme name ? by name I mean the YAML head name.
my theme name is umu_v1

image
you should end up with config similar to this.
You are selecting wrong element it's not .content

umu_v1:
  ... # other theme configs
  card-mod-theme: umu_v1

  card-mod-more-info-yaml: |
      ha-dialog > div { 
        outline: none !important;
      }

keep in mind when you change something in theme u to reload frotnend.
developer-tools -> Services -> frontend.reload_themes
After reloading refresh the page with CTRL + F5 multiplie times.
you need to make sure you configure card_mod to work with themes in configuration.yaml

frontend:
  themes: !include_dir_merge_named themes
  extra_module_url:
    - /hacsfiles/lovelace-card-mod/card-mod.js # << add this

@pickonedev
Copy link

Any idea how to make this with full consistency?

@pickonedev

Are u sure you specified the correct theme name ? by name I mean the YAML head name. my theme name is umu_v1

image you should end up with config similar to this. You are selecting wrong element it's not .content

umu_v1:
  ... # other theme configs
  card-mod-theme: umu_v1

  card-mod-more-info-yaml: |
      ha-dialog > div { 
        outline: none !important;
      }

keep in mind when you change something in theme u to reload frotnend. developer-tools -> Services -> frontend.reload_themes After reloading refresh the page with CTRL + F5 multiplie times. you need to make sure you configure card_mod to work with themes in configuration.yaml

frontend:
  themes: !include_dir_merge_named themes
  extra_module_url:
    - /hacsfiles/lovelace-card-mod/card-mod.js # << add this

Yes, yes, all good.

This is the complete starting of my theme.


#
# PickOne-IOS
#
ios-dark-mode:
  # Global
  card-mod-theme: ios-dark-mode
  card-mod-more-info-yaml: |
    .: |
      ha-dialog {
        --vertical-align-dialog: center !important;
      }
      .container, .content{outline: none !important}

For me, by adding an outline with the value none to class container and content, it is working, but as I said, it does not have consistency. And this fact it is to everything what I have used with card_mod to browser_mod popups, not only the outline, everything.

For example, I use this in order to blur the background of the popup, but still... no consistency.

      card_mod:
        style:
          ha-dialog$: |
            div.mdc-dialog__scrim {
              backdrop-filter: blur(15px) !important;
              -webkit-backdrop-filter: blur(15px) !important;
            }

Sometimes it is working, sometimes it is not.

I am using Fully Kiosk Browser on some Huawei tablets...

@xZetsubou
Copy link

I am using Fully Kiosk Browser on some Huawei tablets...

That's weird it's always works fine its kinda buggy sometimes but works tho, the fact that .container, .content works is weird
Also why are using card_mod for background blur you could use --dialog-backdrop-filter

  browser_mod:
    service: browser_mod.popup
    data:
      style: |
        --dialog-backdrop-filter: blur(15px);

as for outline in worst case if nothing works with you from here download both files and replace the files inside /custom_components/browser_mod

@pickonedev
Copy link

pickonedev commented Aug 16, 2023

--dialog-backdrop-filter: blur(15px);

I didn't know if is working with the backdrop like this :-D There is any documentation with all these --dialog.... styles which are wokring with the popups?

In those files, seems that ".content" is the "mistery" of solving the outline... I added ".container" to be 100% sure :-D

image

@xZetsubou
Copy link

xZetsubou commented Aug 16, 2023

There is any documentation with all these --dialog.... styles which are wokring with the popups?

There are variables by browser_mod in popups docs, but basically you can override any HA variable that are used by popups, using style
for example dialog-backdrop-filter is part of ha-dialog frontend variables, You can also check browser_mod popups variables as well.

@jensrossbach
Copy link

@xZetsubou Is it possible to set the variable dialog-backdrop-filter via theme configuration to have it being applied to any popup in the frontend (or at least popups in lovelace dashboards)? I tried to add it to my theme yaml but it didn't have any effect. Looking into the developer tools of my browser, I can see that --dialog-backdrop-filter is undefined although I've set the variable in the theme. If I set it directly via the developer tools, it works like a charm, but I don't get it working with the theme configuration.

@xZetsubou
Copy link

@jensrossbach in your theme yaml keep in mind it will also works in config card popup as well since it's global to all ha popups

mytheme:
  dialog-backdrop-filter: blur(2em) brightness(0.80)

@jensrossbach
Copy link

Ok, now I got it working by applying this variable to the global theme I selected in the user configuration. It doesn't seem to work when applying it to a theme that is used in a specific dashboard only.

@xZetsubou
Copy link

@jensrossbach I don't think there's a normal way to do that at least as far as I know variables uses HA user theme not lovelaces theme.

@jensrossbach
Copy link

ok, thanks for the help @xZetsubou, applying this variable to the user theme is totally okay for me.

@smeen89
Copy link

smeen89 commented Nov 3, 2023

I have the same issue, been trying the solutions sugested here with no luck. I get an orange border.

@Cheerpipe
Copy link

Hi.

I tested all fixes posted here and none of these worked consistently. The culprit was CloudFlare cache sendmi an older version of browsermod.js interminently.

I got the fix working permanently after do a full cache purge for my cloudflare DNS.

@GabrieleCarabella
Copy link

Try this:

action:
  - service: browser_mod.popup
    data:
      dismissable: false
      autoclose: true
      timeout: 10000
      title: "Your title here"
      size: wide
      style: |
        --popup-outline: none !important;
      content: "Text message"

@himisk2022
Copy link

Was there ever a solution here? The white frame around my popups is driving me crazy. No matter what I try, sometimes it's there, sometimes it's gone.

@z06Drew
Copy link

z06Drew commented Mar 18, 2024

Same, I've tried the suggestions in this thread yet I still get the white border.

@smeen89
Copy link

smeen89 commented Mar 21, 2024

Same here, driving me nuts!

@rog889
Copy link

rog889 commented Apr 15, 2024

I also tried all the workarounds, none of them worked! Driving me nuts too!

@bonstio
Copy link

bonstio commented Jun 20, 2024

+1 A fix would be nice.

@SlipstreamFPV
Copy link

Just bumping this for a fix. Thanks for all of your hard work.

@oyvhov
Copy link

oyvhov commented Aug 26, 2024

+1 A fix would be nice.

@scorpiophenix
Copy link

scorpiophenix commented Aug 27, 2024

I was getting an orange outline around the content on Android devices. Adding the following to the theme file seems to be working, you just need to make sure to clear the storage and cache for the Home Assistant Companion app.

  # Remove outline in popup content on mobile
  card-mod-more-info-yaml: |
    .: |
      .container, .content {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
        -webkit-focus-ring-color: rgba(0, 0, 0, 0);
        outline: none !important;
      }

Edit: You can also make this change in the browser_mod.js file if you prefer. The .content .container section already exists with the padding declaration.

      .content {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
        -webkit-focus-ring-color: rgba(0, 0, 0, 0);
        outline: none !important;
      }
      .content .container {
        padding: 8px 24px 20px 24px;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
        -webkit-focus-ring-color: rgba(0, 0, 0, 0);
        outline: none !important;
      }

@tenkaibr
Copy link

Why hasn't this solution been included in any updates yet?

@z06Drew
Copy link

z06Drew commented Oct 10, 2024

I cant seem to get rid of the white outline either. For a while it was gone, but there must have been some update that brought it back and I cannot recall what I previously did to resolve it. I've tried everything in this post now but nothing is working. Any new suggestions?

@storebatfar
Copy link

Please fix this.

@scorpiophenix
Copy link

The fix I posted above still seems to be working. I am using the first option of adding the code inside my theme and have no problems across multiple devices on Android 8, 10, and 14. Can you provide more information about what device you are seeing the white outline on and what version of Android?

@rog889
Copy link

rog889 commented Nov 21, 2024

The fix I posted above still seems to be working. I am using the first option of adding the code inside my theme and have no problems across multiple devices on Android 8, 10, and 14. Can you provide more information about what device you are seeing the white outline on and what version of Android?

I am a newbie. I am not sure which theme file? Do I need to create a new file themes.yaml and paste your code?

For example, I use Mushroom Theme. Do I add your code in mushroom.yaml?

Thanks

@scorpiophenix
Copy link

I am a newbie. I am not sure which theme file? Do I need to create a new file themes.yaml and paste your code?

For example, I use Mushroom Theme. Do I add your code in mushroom.yaml?

Thanks

It's been a while since I've used the mushroom cards and don't remember the structure of the theme file. It might be easier to follow the 2nd option and update the browser_mod.js file. You can get to this file by going to your custom_components folder and opening the browser_mod folder (see image).

Screen Shot 2024-11-20 at 8 53 48 PM

From there, you will want to edit the browser_mod.js file and search for the .content .container css and replace (lines 146-148 in screenshot) it with the updated css I provided in the post above.

Original
Screen Shot 2024-11-20 at 8 59 21 PM

Updated
Screen Shot 2024-11-20 at 9 00 19 PM

After saving these changes, restart Home Assistant and clear the cache in the browser of the device you are having the issue on. It should hopefully resolve the issue you are having with the outline.

@rog889
Copy link

rog889 commented Nov 21, 2024

It's been a while since I've used the mushroom cards and don't remember the structure of the theme file. It might be easier to follow the 2nd option and update the browser_mod.js file. You can get to this file by going to your custom_components folder and opening the browser_mod folder (see image).

After saving these changes, restart Home Assistant and clear the cache in the browser of the device you are having the issue on. It should hopefully resolve the issue you are having with the outline.

Thanks so much for the detailed instructions. It does work! I tested from Android tablets, and I do not see the white outline anymore form the popup!

So, I guess if browser_mod has any update, I have to update that section every time I update the browser_mod, correct?

Thanks so much! You are the best!

@scorpiophenix
Copy link

Thanks so much for the detailed instructions. It does work! I tested from Android tablets, and I do not see the white outline anymore form the popup!

So, I guess if browser_mod has any update, I have to update that section every time I update the browser_mod, correct?

Thanks so much! You are the best!

So glad that it worked out for you. I've added the pull request 764 to hopefully get this fixed on a future update. You are correct, this will need to be done every time that browser_mod is updated until this or another fix has been implemented.

@rog889
Copy link

rog889 commented Nov 22, 2024

Thanks so much for the detailed instructions. It does work! I tested from Android tablets, and I do not see the white outline anymore form the popup!
So, I guess if browser_mod has any update, I have to update that section every time I update the browser_mod, correct?
Thanks so much! You are the best!

So glad that it worked out for you. I've added the pull request 764 to hopefully get this fixed on a future update. You are correct, this will need to be done every time that browser_mod is updated until this or another fix has been implemented.

So sorry. Don't know what happened. The white outline reappear again for all the browser mod popups. :-(

@scorpiophenix
Copy link

So sorry. Don't know what happened. The white outline reappear again for all the browser mod popups. :-(

Can you share what device this is happening on? Also, does the outline disappear after you interact with the popup or is it always there? If you can provide a screenshot, that would be really helpful to troubleshoot.

@rog889
Copy link

rog889 commented Nov 22, 2024

So sorry. Don't know what happened. The white outline reappear again for all the browser mod popups. :-(

Can you share what device this is happening on? Also, does the outline disappear after you interact with the popup or is it always there? If you can provide a screenshot, that would be really helpful to troubleshoot.

So, all the Samsung Galaxy Tablets running Android with Fully Kiosk, and all standalone Chrome browsers (not Fully Kiosk) on tablets and desktop have this white outline issue for all the browser_mod popup. I tested with Safari on Mac and iPad, and there's NO white outline in Safari browsers. Attached (1st picture) is a screenshot of white outline issue. 2nd screenshot was taken from a Safari browser.

Screenshot 2024-11-21 at 9 24 08 PM Screenshot 2024-11-21 at 9 27 51 PM

@scorpiophenix
Copy link

So, all the Samsung Galaxy Tablets running Android with Fully Kiosk, and all standalone Chrome browsers (not Fully Kiosk) on tablets and desktop have this white outline issue for all the browser_mod popup. I tested with Safari on Mac and iPad, and there's NO white outline in Safari browsers. Attached (1st picture) is a screenshot of white outline issue. 2nd screenshot was taken from a Safari browser.

Thanks for the additional information. I believe I found what was causing this issue and have (hopefully) fixed it. Please follow the exact same steps provided above again. I've updated the CSS in my previous post and am adding it here for reference. Something seems to be changing the outline css, so we need to override that with the !important declaration.

      .content {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
        -webkit-focus-ring-color: rgba(0, 0, 0, 0);
        outline: none !important;
      }
      .content .container {
        padding: 8px 24px 20px 24px;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
        -webkit-focus-ring-color: rgba(0, 0, 0, 0);
        outline: none !important;
      }

@rog889
Copy link

rog889 commented Nov 24, 2024

Thanks for the additional information. I believe I found what was causing this issue and have (hopefully) fixed it. Please follow the exact same steps provided above again. I've updated the CSS in my previous post and am adding it here for reference. Something seems to be changing the outline css, so we need to override that with the !important declaration.

      .content {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
        -webkit-focus-ring-color: rgba(0, 0, 0, 0);
        outline: none !important;
      }
      .content .container {
        padding: 8px 24px 20px 24px;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
        -webkit-focus-ring-color: rgba(0, 0, 0, 0);
        outline: none !important;
      }

I applied your new code with !important; and did further testing. Here is what I found on my 3 Samsung tablets. Each tablet is running different version of Android, 12, 13, and 14. I suspect Google did some changes after Android 12. My tablet with Android 12 doesn't have any white outline at all. Android 13 and 14 started to have this white outline issue even I applied the "important" code. I don't know what else we can do, it seems Android 13 and 14 is doing something strange with the browser_mod pop ups. :-(

There's one more thing I discovered while I was doing the testing. The problem tablets with Android 13 & 14, if I tap on the Title bar (mmWave Human Sensor title area on the previous picture attachment) on the popup, the white line immediately disappears. It's "interactive"!!! I never knew that. Anyway, this is new to me. Thought you might want to know.

@scorpiophenix
Copy link

scorpiophenix commented Nov 24, 2024

I applied your new code with !important; and did further testing. Here is what I found on my 3 Samsung tablets. Each tablet is running different version of Android, 12, 13, and 14. I suspect Google did some changes after Android 12. My tablet with Android 12 doesn't have any white outline at all. Android 13 and 14 started to have this white outline issue even I applied the "important" code. I don't know what else we can do, it seems Android 13 and 14 is doing something strange with the browser_mod pop ups. :-(

There's one more thing I discovered while I was doing the testing. The problem tablets with Android 13 & 14, if I tap on the Title bar (mmWave Human Sensor title area on the previous picture attachment) on the popup, the white line immediately disappears. It's "interactive"!!! I never knew that. Anyway, this is new to me. Thought you might want to know.

Thanks for confirming! You are definitely dealing with an issue where the focus is being applied to the popup and causing this issue. Removing the outline usually resolves that issue in my experience. Make sure that you have the cache cleared on the tablets and try restarting Home Assistant and isolating some of the components being used.

Can you try accessing your dashboard with the popup from a browser on the tablet and not do it through Fully Kiosk to see if that is introducing the problem?

If that doesn't work, you can try the below untested "throw the kitchen sink" at it solution and see if that solves it for you.

      .content {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
        -webkit-focus-ring-color: rgba(0, 0, 0, 0);
        outline: none !important;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -o-user-select: none;
        user-select: none;
        -webkit-box-shadow: none;
        box-shadow: none;
        border: none;
      }
      .content:focus-visible {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
        -webkit-focus-ring-color: rgba(0, 0, 0, 0);
        outline: none !important;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -o-user-select: none;
        user-select: none;
        -webkit-box-shadow: none;
        box-shadow: none;
        border: none;
      }
      .content .container {
        padding: 8px 24px 20px 24px;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
        -webkit-focus-ring-color: rgba(0, 0, 0, 0);
        outline: none !important;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -o-user-select: none;
        user-select: none;
        -webkit-box-shadow: none;
        box-shadow: none;
        border: none;
      }
      .content .container:focus-visible {
        padding: 8px 24px 20px 24px;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
        -webkit-focus-ring-color: rgba(0, 0, 0, 0);
        outline: none !important;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -o-user-select: none;
        user-select: none;
        -webkit-box-shadow: none;
        box-shadow: none;
        border: none;
      }

@rog889
Copy link

rog889 commented Nov 26, 2024

Thanks for confirming! You are definitely dealing with an issue where the focus is being applied to the popup and causing this issue. Removing the outline usually resolves that issue in my experience. Make sure that you have the cache cleared on the tablets and try restarting Home Assistant and isolating some of the components being used.

Can you try accessing your dashboard with the popup from a browser on the tablet and not do it through Fully Kiosk to see if that is introducing the problem?

If that doesn't work, you can try the below untested "throw the kitchen sink" at it solution and see if that solves it for you.

      .content {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
        -webkit-focus-ring-color: rgba(0, 0, 0, 0);
        outline: none !important;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -o-user-select: none;
        user-select: none;
        -webkit-box-shadow: none;
        box-shadow: none;
        border: none;
      }
      .content:focus-visible {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
        -webkit-focus-ring-color: rgba(0, 0, 0, 0);
        outline: none !important;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -o-user-select: none;
        user-select: none;
        -webkit-box-shadow: none;
        box-shadow: none;
        border: none;
      }
      .content .container {
        padding: 8px 24px 20px 24px;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
        -webkit-focus-ring-color: rgba(0, 0, 0, 0);
        outline: none !important;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -o-user-select: none;
        user-select: none;
        -webkit-box-shadow: none;
        box-shadow: none;
        border: none;
      }
      .content .container:focus-visible {
        padding: 8px 24px 20px 24px;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
        -webkit-focus-ring-color: rgba(0, 0, 0, 0);
        outline: none !important;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -o-user-select: none;
        user-select: none;
        -webkit-box-shadow: none;
        box-shadow: none;
        border: none;
      }

Hi, I applied the code and rebooted, but the issue persisted. So, I conducted further investigation and discovered that one dashboard view doesn’t encounter this problem with the popups. I then checked if my YAML code or card_mod was different, and they were identical. I delved deeper and found that the specific “working” view uses the “Mushroom Shadow” theme, while the rest of my views use the “Mushroom” theme. I believe I’ve identified the culprit: the “Mushroom Theme.” Last year, I think I mistakenly switched that view to “Mushroom Shadow.” However, all my views, including the Main home view, are using the generic “Mushroom” theme.

I sincerely apologize for all the trouble caused. I truly appreciate your efforts in going above and beyond to help resolve this peculiar issue.

Thank you

@TheStarFlow
Copy link

TheStarFlow commented Dec 13, 2024

I am a newbie. I am not sure which theme file? Do I need to create a new file themes.yaml and paste your code?我是个新手。我不确定是哪个主题文件?我是否需要创建一个新的文件主题。然后粘贴代码?
For example, I use Mushroom Theme. Do I add your code in mushroom.yaml?例如,我使用蘑菇主题。我要把代码添加到mushroom.yaml中吗?
Thanks 谢谢

It's been a while since I've used the mushroom cards and don't remember the structure of the theme file. It might be easier to follow the 2nd option and update the browser_mod.js file. You can get to this file by going to your custom_components folder and opening the browser_mod folder (see image).我已经有一段时间没有使用蘑菇卡片了,不记得主题文件的结构。按照第二种方法更新browser_mod.js文件可能更容易。您可以通过进入custom_components文件夹并打开browser_mod文件夹来获取此文件(参见图片)。

Screen Shot 2024-11-20 at 8 53 48 PM

From there, you will want to edit the browser_mod.js file and search for the .content .container css and replace (lines 146-148 in screenshot) it with the updated css I provided in the post above.从那里开始,你将需要编辑browser_mod.js文件并搜索css并将其替换为我在上面的文章中提供的更新css(屏幕截图中的第146-148行)。

Original 原始 Screen Shot 2024-11-20 at 8 59 21 PM

Updated 更新 Screen Shot 2024-11-20 at 9 00 19 PM

After saving these changes, restart Home Assistant and clear the cache in the browser of the device you are having the issue on. It should hopefully resolve the issue you are having with the outline.保存这些更改后,重新启动Home Assistant并清除出现问题的设备的浏览器中的缓存。它应该有希望解决你对大纲的问题。

it's worked for me ,thx, :)

Copy link

stale bot commented Feb 25, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.