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

Make html 3.2 macro & hyperlinks easier to click, and enable internal anchors #1427

Closed
Merudo opened this issue Mar 29, 2020 · 3 comments
Closed
Assignees
Labels
feature Adding functionality that adds value tested This issue has been QA tested by someone other than the developer.

Comments

@Merudo
Copy link
Member

Merudo commented Mar 29, 2020

Is your feature request related to a problem? Please describe.

The MapTool links are notorious hard to click; if you move the mouse between press and release, the link won't work.

This has lead many to conclude that the links are bugged: https://forums.rptools.net/viewtopic.php?f=21&t=28439

Additionally, anchor links of the form a href="#x"> don't work within frames and dialogs.

Describe the solution you'd like

Both issues can be fixed relatively easily by replacing the addHyperlinkListener of the HTML pane by a regular mouseListener.

I suggest we make links fire if the mouse is released on the link.

Additional context
I have done most of the work already, with only a few details needing fixing.

@Merudo
Copy link
Member Author

Merudo commented Mar 29, 2020

Test for an anchor link:

[dialog("test"):{<html><body><a href='#bottom'>jump to bottom</a><a name='link1'></a><br>some text<br /><br /><br /><br /><br /><br /><br /><br /><br /><br />some more text<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />some more text<a name='bottom'></a><a href='#link1'>jump to top</a></body></html>}]

Merudo added a commit to Merudo/maptool that referenced this issue Mar 29, 2020
- Change so that links are now launched when the primary mouse button is released on them
- Change so that internal anchors work.  Use <a href='myname'> to set up an anchor, and <a href='#myname'>click</a> to make the link that leads there
- Close RPTools#1427
@Merudo
Copy link
Member Author

Merudo commented Mar 29, 2020

PR #1428 implements this.

@Phergus Phergus added the feature Adding functionality that adds value label Mar 29, 2020
@Phergus
Copy link
Contributor

Phergus commented Mar 30, 2020

Limited testing. Anchors working in frames. Macro links in chat are clickable. (Note I never had an issue with this so effectively no change for me.)

@Phergus Phergus added the tested This issue has been QA tested by someone other than the developer. label Mar 31, 2020
@Phergus Phergus closed this as completed Apr 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Adding functionality that adds value tested This issue has been QA tested by someone other than the developer.
Projects
None yet
Development

No branches or pull requests

2 participants