@@ -500,12 +500,17 @@ function xpathHasClass(className) {
500500
501501 function showCurrent(state)
502502 {
503- var currentNode = state.current();
503+ var currentNode = state.current(), currentRect, searchRect ;
504504 if (currentNode) {
505505 reveal(currentNode);
506506 highlight(root, currentNode, state.nodes);
507507 if ('scrollIntoView' in currentNode) {
508- currentNode.scrollIntoView();
508+ currentNode.scrollIntoView(true);
509+ currentRect = currentNode.getBoundingClientRect();
510+ searchRect = search.getBoundingClientRect();
511+ if (currentRect.top < (searchRect.top + searchRect.height)) {
512+ window.scrollBy(0, -(searchRect.top + searchRect.height + 5));
513+ }
509514 }
510515 }
511516 counter.textContent = (state.isEmpty() ? 0 : state.idx + 1) + ' of ' + state.count();
@@ -641,6 +646,7 @@ function showCurrent(state)
641646 display: block;
642647 white-space: pre;
643648 padding: 5px;
649+ overflow: initial !important;
644650}
645651pre.sf-dump:after {
646652 content: "";
@@ -709,14 +715,16 @@ function showCurrent(state)
709715 border-radius: 3px;
710716}
711717pre.sf-dump .sf-dump-search-hidden {
712- display: none;
718+ display: none !important ;
713719}
714720pre.sf-dump .sf-dump-search-wrapper {
715- float: right;
716721 font-size: 0;
717722 white-space: nowrap;
718- max-width: 100%;
719- text-align: right;
723+ margin-bottom: 5px;
724+ display: flex;
725+ position: -webkit-sticky;
726+ position: sticky;
727+ top: 5px;
720728}
721729pre.sf-dump .sf-dump-search-wrapper > * {
722730 vertical-align: top;
@@ -733,10 +741,11 @@ function showCurrent(state)
733741 height: 21px;
734742 font-size: 12px;
735743 border-right: none;
736- width: 140px;
737744 border-top-left-radius: 3px;
738745 border-bottom-left-radius: 3px;
739746 color: #000;
747+ min-width: 15px;
748+ width: 100%;
740749}
741750pre.sf-dump .sf-dump-search-wrapper > .sf-dump-search-input-next,
742751pre.sf-dump .sf-dump-search-wrapper > .sf-dump-search-input-previous {