Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion packages/mantine/src/blocknoteStyles.css
Original file line number Diff line number Diff line change
Expand Up @@ -330,11 +330,13 @@
max-height: inherit;
overflow-y: auto;
padding: 2px;
width: 350px;
}
Comment on lines +333 to 334

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Cap the fixed width on narrow viewports.

At Line [333], a hard 350px width can make the menu wider than a mobile viewport or narrow containing block. Add a responsive cap so long content wraps without causing horizontal overflow.

Proposed fix
-  width: 350px;
+  width: min(350px, calc(100vw - 16px));
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
width: 350px;
}
width: min(350px, calc(100vw - 16px));
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/mantine/src/blocknoteStyles.css` around lines 333 - 334, Update the
fixed width declaration in the relevant menu style to cap its width at the
available containing-block or viewport width, while retaining the 350px maximum
on wider screens. Ensure long content can wrap without causing horizontal
overflow on narrow viewports.


.bn-mantine .bn-suggestion-menu-item {
cursor: pointer;
height: 52px;
min-height: 52px;
flex-shrink: 0;
}

.bn-mantine .bn-suggestion-menu-item-small {
Expand Down Expand Up @@ -375,6 +377,7 @@
align-items: stretch;
display: flex;
flex: 1;
min-width: 0;
flex-direction: column;
justify-content: flex-start;
padding-right: 16px;
Expand All @@ -387,6 +390,7 @@
font-size: 14px;
margin: 0;
padding: 0;
overflow-wrap: anywhere;
}

.bn-suggestion-menu-item-small .bn-mt-suggestion-menu-item-title {
Expand All @@ -399,6 +403,7 @@
font-size: 10px;
margin: 0;
padding: 0;
overflow-wrap: anywhere;
}

.bn-suggestion-menu-item-small .bn-mt-suggestion-menu-item-subtitle {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading