Element.scrollIntoView (and regular scroll-to-fragment) doesn't work for SVG elements |
|||
Issue descriptionIn the attached TC, the scrollIntoView() call should cause a green rectangle with the word "PASS" next to it appear in view. Instead it scrolls to the root <svg>.
,
Sep 21
,
Sep 21
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/5d6edb4f084778cf635640c4fafd65418af841f7 commit 5d6edb4f084778cf635640c4fafd65418af841f7 Author: Fredrik Söderquist <fs@opera.com> Date: Fri Sep 21 19:45:00 2018 Fix scrollIntoView(...) for SVG elements AbsoluteBoundingBoxRectForScrollIntoView and associated helpers did not compute the correct bounding box for SVG shapes (or anything but the SVG root.) Compute the bounding rect using the stroke bounding box. Bug: 803440 Change-Id: If25ca98b686f17a0db699e569460cb4c276f06a0 Reviewed-on: https://chromium-review.googlesource.com/1238458 Reviewed-by: David Bokan <bokan@chromium.org> Commit-Queue: Fredrik Söderquist <fs@opera.com> Cr-Commit-Position: refs/heads/master@{#593306} [add] https://crrev.com/5d6edb4f084778cf635640c4fafd65418af841f7/third_party/WebKit/LayoutTests/external/wpt/css/cssom-view/scrollIntoView-svg-shape.html [modify] https://crrev.com/5d6edb4f084778cf635640c4fafd65418af841f7/third_party/blink/renderer/core/layout/layout_object.cc
,
Sep 24
|
|||
►
Sign in to add a comment |
|||
Comment 1 by vsync.de...@gmail.com
, Jun 24 2018