BerndGabriel/HtmlViewer

Hyperlink in table cell causes page to be offset vertically.

PortableObjects opened this issue · 1 comments

Initial render of page is displaced vertically when an image is above a table and a cell contains a hyper link.

Environment:

OS: Windows 10
IDE: Lazarus 2.0.10
HtmlViewer: 11.9

`<HTML>
<HEAD>
</HEAD>
<BODY>

<A NAME="TOP"><H1>Consectetur Adipiscing Elit</H1></A>
<P>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in felis molestie.</P>
<P>Quisque lacinia non urna sed molestie. Etiam quis dictum magna.</P>

<IMG SRC="images/50.png">

<P>Quisque lacinia non urna sed molestie. Etiam quis dictum magna.</P>

<H2>Methods</H2>

<TABLE ID="classmethodtable" width="100%">
<TR>
<TH WIDTH="33%" ID="classmethodtableheading">Name</TH>
<TH WIDTH="67%" ID="classmethodtableheading">Comment</TH>
</TR>
<TR ID="ODDROW">
<TD>A <A HREF="CREATE">Create</A></TD>
<TD>Default construct.</TD>
</TR>
</TABLE>

<P>Aliquam sodales venenatis diam, id fermentum dolor venenatis eget.</P>
<P>Etiam scelerisque purus a augue consequat, eget cursus nisi dapibus.Etiam scelerisque purus a augue consequat, eget cursus nisi dapibus.Etiam scelerisque purus a augue consequat, eget cursus nisi dapibus.Etiam scelerisque purus a augue consequat, eget cursus nisi dapibus.Etiam scelerisque purus a augue consequat, eget cursus nisi dapibus.Etiam scelerisque purus a augue consequat, eget cursus nisi dapibus.</P>
<P>Etiam scelerisque purus a augue consequat, eget cursus nisi dapibus.Etiam scelerisque purus a augue consequat, eget cursus nisi dapibus.Etiam scelerisque purus a augue consequat, eget cursus nisi dapibus.Etiam scelerisque purus a augue consequat, eget cursus nisi dapibus.Etiam scelerisque purus a augue consequat, eget cursus nisi dapibus.Etiam scelerisque purus a augue consequat, eget cursus nisi dapibus.</P>
<P>Etiam scelerisque purus a augue consequat, eget cursus nisi dapibus.Etiam scelerisque purus a augue consequat, eget cursus nisi dapibus.Etiam scelerisque purus a augue consequat, eget cursus nisi dapibus.Etiam scelerisque purus a augue consequat, eget cursus nisi dapibus.Etiam scelerisque purus a augue consequat, eget cursus nisi dapibus.Etiam scelerisque purus a augue consequat, eget cursus nisi dapibus.</P>
</BODY>

</HTML>`

First picture shows render with hyperlink in cell, second has hyperlink removed.

Pascal code is

`unit Unit1;

{$mode objfpc}{$H+}

interface

uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, HtmlView;

type

{ TForm1 }

TForm1 = class(TForm)
HtmlViewer1: THtmlViewer;
procedure FormCreate(Sender: TObject);
private

public

end;

var
Form1: TForm1;

implementation

{$R *.lfm}

{ TForm1 }

procedure TForm1.FormCreate(Sender: TObject);
begin
HtmlViewer1.LoadFromFile('dummy1.html');
end;

end.
HtmlViewer1
HtmlViewer2
`

The program tabs to the first focussable control.

If NoTabLink is not defined in htmlcons.inc THtmlViewer tabs through all its links.