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: Command core:component-enter not working in all the cases #3511

Closed
2 tasks
moises-flowize opened this issue Jun 2, 2021 · 1 comment
Closed
2 tasks

Comments

@moises-flowize
Copy link

WARNING

READ and FOLLOW next 3 steps, then REMOVE them before posting the issue

  1. Follow CONTRIBUTING Guidelines https://github.com/artf/grapesjs/blob/master/CONTRIBUTING.md
  2. Do a quick SEARCH first, to see if someone else didn't open the same issue
  3. All relative statements/questions have to be filled/answered, otherwise, the issue might be CLOSED
  4. JSFiddle Starter template https://jsfiddle.net/szLp8h4n
  5. CodeSandbox Starter template https://codesandbox.io/s/1r0w2pk1vl

Version:
0.16.44

You can get the version by typing grapesjs.version into the console

Are you able to reproduce the bug from the demo?

  • Yes
  • [X ] No

What is the expected behavior?
When using the command "core:component-enter" it should select the first child of a container

Describe the bug detailed
If the element selected is a P or H1, the ones that are inline elements it throws an error In the console.
Also, if the element select is a container but the first child is an HTML comment, throws the same error.

Are you able to attach screenshots, screencasts or a live demo?

  • Yes (attach)
  • [ x] No

I fixed creating my own command out of the code of yours at https://github.com/artf/grapesjs/blob/dev/src/commands/view/ComponentEnter.js:

I attach the JS file with the code of my command
component-enter.txt

@moises-flowize moises-flowize changed the title BUG: BUG: Command component-enter not working in all the cases Jun 2, 2021
@moises-flowize moises-flowize changed the title BUG: Command component-enter not working in all the cases BUG: Command core:component-enter not working in all the cases Jun 2, 2021
@artf
Copy link
Member

artf commented Jun 12, 2021

Thanks @moises-flowize that will be fixed in the next release ac96298

@artf artf added this to To do in Release v0.17.19 via automation Jun 12, 2021
@artf artf added the bug label Jun 12, 2021
@artf artf closed this as completed Jun 12, 2021
Release v0.17.19 automation moved this from To do to Done Jun 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Development

No branches or pull requests

2 participants