You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The CSS style position: fixed does not appear to work on AnkiMobile. This has multiple implications:
Audio buttons, which are normally fixed to the bottom left corner, are now fixed to the bottom left corner of the qa div.
Anything that is supposed to take up the full screen, such as the info circle and image zoom, only takes up the area of the qa div.
Unfortunately, I do not know of a good way of fixing this. If anyone is interested in taking a jab at this issue, please go for it!
Attempted solutions
Using position: -webkit-fixed
Using various variants of transform(0)
Setting qa to have height: 100vh, and moving the play buttons div to be a child of qa via JavaScript. This is currently the most promising approach, but is very fragile to properly deal with, and likely requires a lot of care to handle properly. Certain assumptions within the existing JavaScript will likely be broken, and have to be dealt with if this solution is implemented.
Current Workarounds
There is no current workaround for the info circle and image zoom, as they aren't as important to deal with compared to the audio buttons.
For the audio buttons, the workaround is to hide the audio buttons altogether, and instruct users to set the "tap bottom left" option to "replay audio".
Comments
position: fixed seems to work as expected on AnkiWeb Safari, Ankidroid, and Anki's PC client (on Linux, Windows and MacOS). In other words, this is an AnkiMobile unique problem.
In general, debugging AnkiMobile is much more difficult than something like Ankidroid or Anki (desktop client), due to its closed source nature. To get the document structure, I usually have to print out document.documentElement.outerHTML into some temporary div.
Potentially of importance: For my device, AnkiMobile's HTML starts with:
A potential workaround to fix the audio buttons specifically is to simply move the audio parent element to the last child of the main element. This will make the audio buttons show up below the sentence. However, the user will then have to scroll down if the definition is too long in order to play the audio.
The CSS style
position: fixed
does not appear to work on AnkiMobile. This has multiple implications:qa
div.qa
div.Unfortunately, I do not know of a good way of fixing this. If anyone is interested in taking a jab at this issue, please go for it!
Attempted solutions
position: -webkit-fixed
transform(0)
qa
to haveheight: 100vh
, and moving the play buttons div to be a child ofqa
via JavaScript. This is currently the most promising approach, but is very fragile to properly deal with, and likely requires a lot of care to handle properly. Certain assumptions within the existing JavaScript will likely be broken, and have to be dealt with if this solution is implemented.Current Workarounds
Comments
position: fixed
seems to work as expected on AnkiWeb Safari, Ankidroid, and Anki's PC client (on Linux, Windows and MacOS). In other words, this is anAnkiMobile
unique problem.document.documentElement.outerHTML
into some temporary div.main
element. This will make the audio buttons show up below the sentence. However, the user will then have to scroll down if the definition is too long in order to play the audio.Further reading material
Pictures
The text was updated successfully, but these errors were encountered: