Issue #2201πŸ’¬ AnsweredOpened August 18, 2019by grant0071 reactions

Allow scroll of the canvas if the device height exceeds the available height

Quick answerby ghost❀ 1

Just add style overflow: auto to .gjs-cv-canvas__frames

Read full answer below ↓

Question

Given the following code example...

editor.DeviceManager.add('test', '300px', {
                      height: '1000px',
                      widthMedia: '300px',
});
editor.setDevice("test");

Results in no ability to scroll to top of canvas if editor display area is less than specified height of the device.

See Fiddle for demonstration...

https://jsfiddle.net/gstone007/0vq3o2jf/1/

Answers (3)

ghostβ€’ September 7, 2019

Just add style overflow: auto to .gjs-cv-canvas__frames

artfβ€’ September 15, 2019

After exploring a bit more about this issue I'd suggest just not to exceed the canvas height with the device one. Unfortunately, currently, making any part of the canvas scrollable (solution suggested by @TheDiamondKing ) will lead to unexpected behaviors. I'm working on the frame and canvas refact...

contentfreeβ€’ July 4, 2023

@artf Is your comment still true? Does adding overflow: auto (especially in a "designer mode" / "absolute mode" canvas) still cause problems?

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 β†’

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.