skip to Main Content

Firefox and Edge do not have this problem.

So, with Chrome, when I am trying to select a text, the text really gets selected but it is not visible, I mean the text background does not change. Other websites seem fine. Only GitHub website behaves like this.

I think it’s a bug of GitHub website, because the CSS style, which prevents changing text background, is coming from GitHub server.

Please see the video:
https://www.youtube.com/watch?v=HA1gmRHvbWs

2

Answers


  1. Chosen as BEST ANSWER

    Temporary solution is to run this code in the dev tools console window:

    const addStyle = (styleString) => {
      const style = document.createElement('style');
      document.head.append(style);
      style.textContent = styleString;
    };
    
    addStyle(`
      body *::selection {
        background-color: rgb(50 80 90 / 0.5) !important;
      }
    `);
    

    Yeah, every time we refresh the page, we will have to run this code again. It's just a quick temporary solution.


  2. I think I found the solution.

    I clicked "reset all" in chrome://flags and now the problem seems fixed.

    Source:
    https://github.com/orgs/community/discussions/50295

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search