RunDMC
RunDMC copied to clipboard
RFE: enable browser search highlighting in scrollbar for docapp
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!
Kim, can you point me to a page where this works so I can understand what you mean?
My apologies. I created a github email filter recently, which has induced "out of sight, out of mind". Here is an example:
- Visit http://developer.marklogic.com/learn
- Hit ctrl-f to open the browser search box, then type in "java"
- 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.
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.
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.
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.