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

[Bug]: Grapes change page position #1865

Closed
Gianglo opened this issue Mar 6, 2019 · 2 comments
Closed

[Bug]: Grapes change page position #1865

Gianglo opened this issue Mar 6, 2019 · 2 comments

Comments

@Gianglo
Copy link

Gianglo commented Mar 6, 2019

Hello,
I found the following problem using grapes inside an html page:
when you click on some elements of the editor, such as the arrow to move an element in the label manager, all the page shift up.

The problem is also found in your JSFiddle Starter template https://jsfiddle.net/szLp8h4n.

bug_grapes

@artf
Copy link
Member

artf commented Mar 9, 2019

Ok, we use the scrollIntoView API to center elements in the canvas (when you select the component in Layers) and layers (on component select in canvas) but seems like this bubbles up to the main window. By looking at https://stackoverflow.com/a/52835382 this configuration seems to fix the issue

const editor = grapesjs.init({
	// ...
  	layerManager: {
  		scrollCanvas: { behavior: 'smooth', block: 'nearest' },
    	scrollLayers: { behavior: 'auto', block: 'nearest'},
  	},
});

I'll update the default values in the next release

@artf artf added the bug label Mar 9, 2019
@artf artf closed this as completed in fef3058 Mar 9, 2019
debba pushed a commit to debba/grapesjs that referenced this issue Mar 12, 2019
@lock
Copy link

lock bot commented Mar 10, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot added the outdated label Mar 10, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Mar 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants