question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BUG: Block Highlight Display Bug

See original GitHub issue

Version: 0.6.18

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

I think this may be due to the demo being in full screen mode?

What is the expected behavior? I would imagine that the Rich Text Editor toolbar placement should be near the text block being edited. Additionally, double-clicking the text object does not always trigger the RTE toolbar.

Describe the bug detailed This only appears to happen when the Editor is NOT in full screen mode. When it is on a standard browser window that can be scrolled, it seems that the placement of the RTE is or can be subject to miscalculation based on the window scroll position. Additionally, double-clicking a text block does not always display the RTE toolbar.

Update: Initially I thought it was just tied to the RTE placement. But it appears, as I mention in my latest comment, that it happens to content blocks when highlighting / selecting them IF the Grapes editor IS NOT in full screen mode and the top of the editor placement is not at the top of the viewport. I’ve attached a screencast in a zip file in my last comment in this thread.

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

[x] Yes (attach) [ ] No

Screen Shot 2020-10-06 at 7 59 54 AM

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:20 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
HeyWreckercommented, Oct 20, 2020

@artf Like you, I wasn’t able to reproduce in a fiddle. So I began decomposing the HTML piece by piece until I discovered that one of the primary site containers had an overflow-x: hidden; defined on the class and for some reason or another that seemed to be playing havoc with the GrapesJS highlighting and toolbar placement. I corrected that issue and that, in addition to updating the latest version and assigning the listenToEl property, fixed everything. It really was the overflow-x: hidden on the root div that appeared to drive the issue.

Thank you very much for your time and effort in helping me dig out this problem.

1reaction
artfcommented, Oct 13, 2020

Look, in the latest release, we’ve added this option https://github.com/artf/grapesjs/blob/8822aa6c6e8ced09ad50f2c8392f1754d3a6ec8b/src/editor/config/config.js#L151-L157

So, at first, ensure you’re not serving a cached grapesjs version from your browser (run in devtools console.log(grapesjs.version)) and then check that your scrollable panel is the first parent of your <div id="gjs-container">. In case, the scrollable panel is not the parent of your grapesjs container (which, by default, will be listened) you should be able to pass it as an option of listenToEl

Read more comments on GitHub >

github_iconTop Results From Across the Web

There seems to be a bug in the code highlighting - v6
Problems : First, add code block highlight for markdown, then assign a long text to DOC of editor, as shown in the picture,...
Read more >
252561 – Highlight to display comment.
Bug 252561 - Highlight to display comment. ... whether it be a variable or a block of code, right click on the highlighted...
Read more >
GUI 740 - code highlighting bugs - SAP Community
Hi,. Might be solved with note 2081078 - SAP GUI 7.40 ABAP Editor displays incorrect syntax colors for ABAP source code or note...
Read more >
Weird Bug with Highlight.js - Perishable Press
The bug is that Highlight.js is applying syntax highlighting, even when the element does not include the required language- class. So a code ......
Read more >
[MC-36778] Block Selection Cursor is No Longer Transparent
The box which highlights blocks you are looking at is no longer ... Bug - A problem which impairs or prevents the functions...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found