Issue #3679πŸ’¬ AnsweredOpened Aug 6, 2021by imouou0 reactions

Device width is invalid by default

Quick answerby artf

Yeah, you're right, actually, there is no option to select the default device... For now, as a workaround, do it manually after init: And as you're using the mobile-first approach, you would need to fix your Desktop device: In the next release, I'll add the default option in the device manager configuration

Read full answer below ↓

Question

Thanks for #3673 I have a new bug feedback. Version:. 0.17.22 Are you able to reproduce the bug from the demo?[ ] Yes[ ] No What is the expected behavior? I want the default to be the width of the mobile device, so I configured min-width priority, but only the mobile width is displayed by default on the select box, and the page width has not changed. I use editor.setDevice('Mobile'); Yes, but in the new page management, the new page is also the same, I continue to use this method is invalid, so I think there should be a better way to deal with it. Describe the bug detailed What is the current...

Answers (2)

artfβ€’ Aug 13, 2021

Yeah, you're right, actually, there is no option to select the default device... For now, as a workaround, do it manually after init: And as you're using the mobile-first approach, you would need to fix your Desktop device: In the next release, I'll add the default option in the device manager conf...

GJSBlockβ€’ May 17, 2026

Thanks for reporting this, @imouou. The issue with Device width is invalid by default appears to be a race condition or state management timing problem. This typically happens when component lifecycle events and DOM modifications overlap, creating an inconsistent state. What to try: Add a setTimeou...

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins β†’
Premium option

Premium plugins ship with support, regular updates, and production-ready features β€” save days of integration work.

Browse premium plugins β†’

Related tutorials

In-depth guides on the same topic.

All tutorials β†’

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.