RunDMC icon indicating copy to clipboard operation
RunDMC copied to clipboard

RFE: enable browser search highlighting in scrollbar for docapp

Open kcoleman-marklogic opened this issue 10 years ago • 5 comments

One of the nicest features about searching a page with Chrome is that it highlights the matches not just in the text of the page but also in the scrollbar. This means I can quickly scroll around the matches when I need to, instead of repeatedly smacking ctrl-F. I imagine other modern browsers have a similar feature.

Unfortunately, something we do in rendering the documentation utterly defeats this browser capability. You still get the content highlights, but you don't get the scrollbar highlights.

I don't know what makes it possible in the first place, so I have no idea whether we can make it work with some div or CSS tweaks, but it certainly would be nice!

kcoleman-marklogic avatar Nov 24 '14 18:11 kcoleman-marklogic

Kim, can you point me to a page where this works so I can understand what you mean?

dsokolsky avatar Nov 24 '14 18:11 dsokolsky

My apologies. I created a github email filter recently, which has induced "out of sight, out of mind". Here is an example:

  1. Visit http://developer.marklogic.com/learn
  2. Hit ctrl-f to open the browser search box, then type in "java"
  3. If you look at the scrollbar on the left, you should see a bunch of yellow lines, corresponding to places on the page where the search term occurs.

You should be able to see this behavior with most web pages, in my experience. For example, hit amazon.com and search for "recommend". Or hit this (entirely random!) page on stackoverflow and search for "schema": http://stackoverflow.com/questions/4572352/how-to-document-an-xml-schema.

kcoleman-marklogic avatar Dec 02 '14 22:12 kcoleman-marklogic

Ah, I understand now (I don't use chrome that often so not used to it). It must be something about the css layout that makes it not happen. Mike, if you see an easy way to get this to work (or "not break it" maybe is a better way to say it...), then it would be nice. But not a high priority.

dsokolsky avatar Dec 02 '14 22:12 dsokolsky

I don't have a solution for this, but here are my notes so far. At http://en.wikipedia.org/wiki/File:Scrollbar_trough_marks.png one wikipedia author called these "scrollbar trough marks". At https://code.google.com/p/chromium/issues/detail?id=87406 the reporter called them "hints" while the responding developer called them "tick marks" and referred to ScrollbarThemeChromium::paintTickmarks.

The problem is that chrome only appears to set these tickmarks for the document scrollbar. Because we have two independent scrolling areas for the TOC and content, we use overflow scrolling and never use the document scrollbar. There's an open issue https://code.google.com/p/chromium/issues/detail?id=18221 that would probably take care of this, but it's from 2009 and doesn't seem to have anyone interested in working on it. Or we could try to come up with another layout model, but I think that would involve a radically different approach to the UI.

mblakele avatar Feb 02 '15 19:02 mblakele

Per comment above, implementing this would require deep changes to page layout. I'm going to take this off my issue list for now, but let's include it in any future discussion of layout redesign.

mblakele avatar Mar 03 '15 22:03 mblakele