When a link is not within the current client rectangle of the html panel, e.g. have to scroll to see it, the link doesn't show as clickable (mouse cursor doesn't change) and isn't clickable either.
It looks like the method DomUtils.GetLinkBox doesn't take into consideration the offset values but the passed in location does (for instance in HtmlContainerInt's OffSetByScroll method gets called before calling DomUtils.GetLinkBox).
Any work around for this one? I've been playing around with getting the HtmlContainer's ScrollOffset in GetLinkBox and have had some success, but nothing to make it fully work.
Thanks.
Comments: After some more research, adding the offset for only the X value in the DomUtils.GetLinkBox method seems to fix the issue of any link not visible (behind a horizontal scroll). For some reason, links not visible with a vertical scroll work fine without the adjustment. Here is my change for the DomUtils.GetLinkBox method: ``` public static CssBox GetLinkBox(CssBox box, RPoint location) { if (box != null) { if (box.IsClickable && box.Visibility == CssConstants.Visible) { if (IsInBox(box, location)) return box; } // handle an offset from the htmlcontainer // Note: seems like scroll offset down is fine without offset var offset = box.HtmlContainer != null ? box.HtmlContainer.ScrollOffset : new RPoint(0,0); RRect rect = box.ClientRectangle; rect.X = rect.X - offset.X; if (box.ClientRectangle.IsEmpty || rect.Contains(location)) { foreach (var childBox in box.Boxes) { var foundBox = GetLinkBox(childBox, location); if (foundBox != null) return foundBox; } } } return null; } ```
It looks like the method DomUtils.GetLinkBox doesn't take into consideration the offset values but the passed in location does (for instance in HtmlContainerInt's OffSetByScroll method gets called before calling DomUtils.GetLinkBox).
Any work around for this one? I've been playing around with getting the HtmlContainer's ScrollOffset in GetLinkBox and have had some success, but nothing to make it fully work.
Thanks.
Comments: After some more research, adding the offset for only the X value in the DomUtils.GetLinkBox method seems to fix the issue of any link not visible (behind a horizontal scroll). For some reason, links not visible with a vertical scroll work fine without the adjustment. Here is my change for the DomUtils.GetLinkBox method: ``` public static CssBox GetLinkBox(CssBox box, RPoint location) { if (box != null) { if (box.IsClickable && box.Visibility == CssConstants.Visible) { if (IsInBox(box, location)) return box; } // handle an offset from the htmlcontainer // Note: seems like scroll offset down is fine without offset var offset = box.HtmlContainer != null ? box.HtmlContainer.ScrollOffset : new RPoint(0,0); RRect rect = box.ClientRectangle; rect.X = rect.X - offset.X; if (box.ClientRectangle.IsEmpty || rect.Contains(location)) { foreach (var childBox in box.Boxes) { var foundBox = GetLinkBox(childBox, location); if (foundBox != null) return foundBox; } } } return null; } ```