kooloveme / thtmlviewer

Automatically exported from code.google.com/p/thtmlviewer
Other
0 stars 0 forks source link

GetUrl returns wrong "title" for inner div-tags #318

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Which steps will reproduce the problem?

1. Load the following html content into a HtmlViewer
<div title="Outer ToolTip">
  Text outer
  <div title="Inner ToolTip">
    Text inner
  </div>
  Text outer
</div>

2. Add the following OnMouseMove handler to HtmlViewer

procedure TForm1.HtmlViewer1MouseMove(...);
var
  UrlTarget: TUrlTarget;
  FormControl: TIDObject;
  Title: string;
begin
  UrlTarget := nil;
  if guTitle in HtmlViewer1.GetURL(X, Y, UrlTarget, FormControl, Title) then
    Caption := Title;
  UrlTarget.Free;
end;

3. Start the application and move the mouse over the "Inner Text"

What is the expected output?
The form's caption changes to "Inner ToolTip"

What do you see instead?
The form's caption changes to "Outer ToolTip"

Which version of the product are you using?
svn head

Which compiler version are you using? On which operating system?
Delphi 2009, Windows 7

Original issue reported on code.google.com by Andreas....@gmail.com on 21 Nov 2013 at 7:38

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for spotting and fixing this issue.

Original comment by OrphanCat on 26 Jan 2014 at 6:40