Skip to content

Commit

Permalink
Fix wrong click behaviour in Apple Books with drama
Browse files Browse the repository at this point in the history
Apple Books has a specific behaviour for tables: if you click on them you get a scannable zoomable popup of the whole table. This is really nice functionality, until you realise that we use tables to lay drama out.

A fix is to block events on drama tables. Obviously we have some links (for example endnotes) inside drama that need to remain clickable, so we unblock for those.
  • Loading branch information
robinwhittleton committed Nov 4, 2024
1 parent eba2928 commit f5214e1
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions se/data/templates/compatibility.css
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,15 @@ img.mathml{
:root[__ibooks_internal_theme] blockquote p:first-child{
hanging-punctuation: first last !important;
}

/* Apple Books will load a pannable zoomable table view when clicked, which is useful unless you’re
trying to read a piece of drama. */
[epub|type~="z3998:drama"] table,
table[epub|type~="z3998:drama"]{
pointer-events: none;
}

[epub|type~="z3998:drama"] table a,
table[epub|type~="z3998:drama"] a{
pointer-events: auto;
}

0 comments on commit f5214e1

Please sign in to comment.