Skip to content

Fix missing catch in clipboard navigation#35

Open
dsimansk wants to merge 1 commit into
functions-dev:masterfrom
dsimansk:pr/fix-catch
Open

Fix missing catch in clipboard navigation#35
dsimansk wants to merge 1 commit into
functions-dev:masterfrom
dsimansk:pr/fix-catch

Conversation

@dsimansk

Copy link
Copy Markdown
Contributor

Changes

  • Fix missing catch in clipboard navigation

Per issue description:

GitHub Pages clipboard fix - Add missing .catch() on navigator.clipboard.writeText promise chain to prevent unhandled rejection if clipboard permission is denied.

@matejvasek is it that simple? :)

@matejvasek matejvasek requested a review from twoGiants June 10, 2026 12:34
Comment thread pages/index.html
btn.classList.add('copied');
setTimeout(() => { btn.classList.remove('copied'); }, 1500);
});
}).catch(() => {});

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe at least log the error?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or better yet display some error to user in UI.

@twoGiants twoGiants left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep it up and see my comment below 😸 👍

Comment thread pages/index.html
btn.classList.add('copied');
setTimeout(() => { btn.classList.remove('copied'); }, 1500);
});
}).catch(() => {});

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets add some error handling here. A visible user message. Something unobtrusive but visible for the user, like the catch in line 245 is doing. But I wouldn't use the same element as in line 245 -> that's the yaml file content area.

@dsimansk dsimansk Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK, thanks for the hints. It didn't seem right to just ignore the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants