Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: elementOverflow code #1104

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

fix: elementOverflow code #1104

wants to merge 1 commit into from

Conversation

matthewlipski
Copy link
Collaborator

No description provided.

Copy link

vercel bot commented Sep 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
blocknote ✅ Ready (Inspect) Visit Preview Sep 26, 2024 9:25am
blocknote-website ✅ Ready (Inspect) Visit Preview Sep 26, 2024 9:25am

container = defaultGetContainer(element);
}
if (!container) {
return "none";
Copy link
Collaborator

Choose a reason for hiding this comment

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

can this happen or should it be an error?

) {
let container = getContainer?.();
if (!container) {
container = defaultGetContainer(element);
Copy link
Collaborator

Choose a reason for hiding this comment

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

why not just say getContainer = defaultGetContainer in the function signature?

!container.classList.contains("bn-suggestion-menu") &&
!container.classList.contains("bn-grid-suggestion-menu")
) {
return;
Copy link
Collaborator

Choose a reason for hiding this comment

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

let's make explicit with return undefined (instead of empty return statement)

const defaultGetContainer = (element: HTMLElement) => {
let container: HTMLElement = element;

while (
Copy link
Collaborator

Choose a reason for hiding this comment

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

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.

2 participants