Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TViewHtmlText当有两个超链接的时候,第二个超链接的点击似乎收不到 #57

Closed
wr960204 opened this issue Apr 16, 2023 · 1 comment

Comments

@wr960204
Copy link

TViewHtmlText当有两个超链接的时候,第二个超链接的点击似乎收不到。下面是我改了代码,不知道是否理解的正确
procedure TViewHtmlText.MouseUp(Sender: TView; Button: TMouseButton;
Shift: TShiftState; X, Y: Single);
var
Item: THtmlTextItem;
I: Integer;
begin
//if (Button = TMouseButton.mbLeft) and (FLinkHot >= 0) and (FLinkHot < FLinkHrefs.Count) then begin //如果一段HTML中有两个a的href。则后面的链接收不到click的
if (Button = TMouseButton.mbLeft) and (FLinkHot >= 0) and (FLinkHot < FLinkRangeCount) then begin //这样改两个a href的时候第二个链接才能走到下面
if Assigned(Sender) then begin
for I := 0 to FList.Count - 1 do begin
if FList[I].Link = FLinkHot then begin
Item := FList[I];
Sender.DoLinkClick(Item.Text, FLinkHrefs[Item.LinkURL]);
Break;
end;
end;
end;
end;
end;

@KngStr
Copy link
Collaborator

KngStr commented Apr 16, 2023

感谢反馈,问题确认:两个相同的URL,后面的会无法点击。

@KngStr KngStr closed this as completed Apr 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants