-
Notifications
You must be signed in to change notification settings - Fork 345
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
client: Fix hidden buttons on mobile
React uses a single top-level event handler for everything so we need to stop propagation on links for them to work. We already did that on the link at the end of the article but the toolbar link is only supposed to be shown on desktop, which does not suffer from parent element responding to the click event since only the title of the entry is clickable there. The “next” key is much weirder and I have no idea why it requires a delay for switching to next entry to trigger. But it seems to work so let’s keep it as workaround for now. In the future, we will switch to manipulating the model directly instead of synthesizing click events on UI elements and that will hopefully get rid of weird behaviour like this. Fixes: #1248
- Loading branch information
Showing
2 changed files
with
10 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import tinykeys from 'tinykeys'; | ||
|
||
const Direction = { | ||
export const Direction = { | ||
PREV: 'prev', | ||
NEXT: 'next' | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters