Fix subpage links in tables for Safari

The `pointer-events: none;` style tag will make the link unclickable by some browsers (tested on iOS and MacOS Safari). This pull request adds a line of code, which will delete this tag.
This commit is contained in:
Joonatan Jakobson 2020-11-19 23:57:11 +02:00 committed by GitHub
parent 44b1b6d22d
commit 92473cdc45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -463,6 +463,7 @@ class Parser:
table_row_block_id = table_row["data-block-id"]
table_row_href = "/" + table_row_block_id.replace("-", "")
row_target_span = table_row.find("span")
row_target_span["style"] = row_target_span["style"].replace("pointer-events: none;","")
row_link_wrapper = soup.new_tag(
"a", attrs={"href": table_row_href, "style": "cursor: pointer; color: inherit; text-decoration: none; fill: inherit;"}
)