Skip to content

Commit

Permalink
fix(richtext-lexical): drag and add block handles disappear too quick…
Browse files Browse the repository at this point in the history
…ly for smaller screen sizes. (#6144)
  • Loading branch information
AlessioGr committed Apr 30, 2024
1 parent dc31d9c commit 6a9cde2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const LexicalEditor: React.FC<Pick<LexicalProviderProps, 'editorConfig' |

useEffect(() => {
const updateViewPortWidth = () => {
const isNextSmallWidthViewport = window.matchMedia('(max-width: 1025px)').matches
const isNextSmallWidthViewport = window.matchMedia('(max-width: 768px)').matches

if (isNextSmallWidthViewport !== isSmallWidthViewport) {
setIsSmallWidthViewport(isNextSmallWidthViewport)
Expand Down

0 comments on commit 6a9cde2

Please sign in to comment.