MCPcopy
hub / github.com/philc/vimium / scrollIntoView

Method scrollIntoView

content_scripts/mode_visual.js:218–226  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

216
217 // Scroll the focus into view.
218 scrollIntoView() {
219 if (this.selection.type !== "None") {
220 const elementWithFocus = DomUtils.getElementWithFocus(
221 this.selection,
222 this.getDirection() === backward,
223 );
224 if (elementWithFocus) return Scroller.scrollIntoView(elementWithFocus);
225 }
226 }
227}
228
229class VisualMode extends KeyHandlerMode {

Callers 4

commandHandlerMethod · 0.80
commandHandlerMethod · 0.80
initMethod · 0.80
followLinkFunction · 0.80

Calls 1

getDirectionMethod · 0.95

Tested by

no test coverage detected