Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9bb60c9

Browse files
committed
feature#28854 [VarDumper] Scroll into view when searching (ro0NL)
This PR was merged into the 4.2-dev branch.Discussion----------[VarDumper] Scroll into view when searching| Q | A| ------------- | ---| Branch? | master| Bug fix? | no| New feature? | yes| BC breaks? | no <!-- seehttps://symfony.com/bc -->| Deprecations? | no| Tests pass? | yes <!-- please add some, will be required by reviewers -->| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->| License | MIT| Doc PR | symfony/symfony-docs#... <!-- required for new features -->This jumps to the found element when using the javascript widget for searching HTML dumps. Inspired by Ctrl+F in Chrome :)It's super convenient with long dumps, however i wasnt able to position the search input on the right in a fixed manner... because CSS 😓 i was hoping@ogizanagi could add a patch for it.Also seehttps://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoViewCommits-------647a937 [VarDumper] Scroll into view when searching
2 parentsc11fe35 +647a937 commit9bb60c9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

‎src/Symfony/Component/VarDumper/Dumper/HtmlDumper.php‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,9 @@ function showCurrent(state)
504504
if (currentNode) {
505505
reveal(currentNode);
506506
highlight(root, currentNode, state.nodes);
507+
if ('scrollIntoView' in currentNode) {
508+
currentNode.scrollIntoView();
509+
}
507510
}
508511
counter.textContent = (state.isEmpty() ? 0 : state.idx + 1) + ' of ' + state.count();
509512
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp