regex-search icon indicating copy to clipboard operation
regex-search copied to clipboard

Result highlights remains after partially refresh page

Open feigaoxyz opened this issue 10 years ago • 2 comments

  1. search something (i.e. "\w+") on Issues Page: https://github.com/gsingh93/regex-search/issues
  2. click "regex-search" at top part of page to return to home of project
  3. the highlights of previous search result remain in yellow in the new view

If do a full refresh like Cmd+R, the highlights goes away as expected.

feigaoxyz avatar Sep 03 '14 10:09 feigaoxyz

This is a interesting issue. My first guess is that Github is loading the lower half of the page with JavaScript and not changing the upper half of the page. Not sure when/how I can fix this, but thanks for the bug report!

gsingh93 avatar Sep 03 '14 13:09 gsingh93

Interestingly, the yellow highlights also remain on the previously searched page, i.e. following on from feigaochn:

Step 4. Press back button

the search terms on the initial main body will still be highlighted, but the text can no longer be searched by a new search.

I agree with gsingh93, links and the back button are triggering pjax calls to load content - I'm guessing that the 'mark' elements created during the search process are cached along with the rest of the page, and reloaded in a format that's inaccessible to the extension. Still, not a major issue as a refresh will clear it.

tommilligan avatar May 06 '15 16:05 tommilligan