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.

MonacoEditor: Console error when used twice in seperate tabs

See original GitHub issue

Describe the bug My Page consists of a TabView with several tabs. Two of them each contain one MonacoEditor. When switching tabs from one editor to the other, the following error is thrown in the console. This goes away after reloading via F5.

VM6290:5 Element already has context attribute: ui-monaco-editor-ed
C @ VM6290:5
createScoped @ VM6290:5
e @ VM6290:5
L @ VM6290:5
R @ VM6290:5
(anonymous) @ VM6290:5
W @ VM6290:5
U @ VM6290:5
a._doRender @ eNp9j9EOwjAIRb9o8r6_qS3bWFuopc1c4scbnXGmOl-4N3DIBZgVBrFVT7PeUqaIg7Go_XypmFfY5N-sS6GOxO2-lYxfrZiEkUvLDhSwpiDGwW4bRm2WEJJhDPDhG2qS4nGFTZpZkWoneFZdKDXXdXgtyErC2v_sHuPnINZXgpc2scSplmjUw9s1hDMFE1mPGXZ7HBeFjRV0VCTDQm7E0hEH4sdHdxLLuWI.js.seam?ln=omnifaces.combined&v=1615471860000:711
a._render @ eNp9j9EOwjAIRb9o8r6_qS3bWFuopc1c4scbnXGmOl-4N3DIBZgVBrFVT7PeUqaIg7Go_XypmFfY5N-sS6GOxO2-lYxfrZiEkUvLDhSwpiDGwW4bRm2WEJJhDPDhG2qS4nGFTZpZkWoneFZdKDXXdXgtyErC2v_sHuPnINZXgpc2scSplmjUw9s1hDMFE1mPGXZ7HBeFjRV0VCTDQm7E0hEH4sdHdxLLuWI.js.seam?ln=omnifaces.combined&v=1615471860000:710
render @ eNp9j9EOwjAIRb9o8r6_qS3bWFuopc1c4scbnXGmOl-4N3DIBZgVBrFVT7PeUqaIg7Go_XypmFfY5N-sS6GOxO2-lYxfrZiEkUvLDhSwpiDGwW4bRm2WEJJhDPDhG2qS4nGFTZpZkWoneFZdKDXXdXgtyErC2v_sHuPnINZXgpc2scSplmjUw9s1hDMFE1mPGXZ7HBeFjRV0VCTDQm7E0hEH4sdHdxLLuWI.js.seam?ln=omnifaces.combined&v=1615471860000:464
(anonymous) @ eNp9j9EOwjAIRb9o8r6_qS3bWFuopc1c4scbnXGmOl-4N3DIBZgVBrFVT7PeUqaIg7Go_XypmFfY5N-sS6GOxO2-lYxfrZiEkUvLDhSwpiDGwW4bRm2WEJJhDPDhG2qS4nGFTZpZkWoneFZdKDXXdXgtyErC2v_sHuPnINZXgpc2scSplmjUw9s1hDMFE1mPGXZ7HBeFjRV0VCTDQm7E0hEH4sdHdxLLuWI.js.seam?ln=omnifaces.combined&v=1615471860000:464
invokeDeferredRenders @ eNp9j9EOwjAIRb9o8r6_qS3bWFuopc1c4scbnXGmOl-4N3DIBZgVBrFVT7PeUqaIg7Go_XypmFfY5N-sS6GOxO2-lYxfrZiEkUvLDhSwpiDGwW4bRm2WEJJhDPDhG2qS4nGFTZpZkWoneFZdKDXXdXgtyErC2v_sHuPnINZXgpc2scSplmjUw9s1hDMFE1mPGXZ7HBeFjRV0VCTDQm7E0hEH4sdHdxLLuWI.js.seam?ln=omnifaces.combined&v=1615471860000:458
postTabShow @ eNp9j9EOwjAIRb9o8r6_qS3bWFuopc1c4scbnXGmOl-4N3DIBZgVBrFVT7PeUqaIg7Go_XypmFfY5N-sS6GOxO2-lYxfrZiEkUvLDhSwpiDGwW4bRm2WEJJhDPDhG2qS4nGFTZpZkWoneFZdKDXXdXgtyErC2v_sHuPnINZXgpc2scSplmjUw9s1hDMFE1mPGXZ7HBeFjRV0VCTDQm7E0hEH4sdHdxLLuWI.js.seam?ln=omnifaces.combined&v=1615471860000:539
show @ eNp9j9EOwjAIRb9o8r6_qS3bWFuopc1c4scbnXGmOl-4N3DIBZgVBrFVT7PeUqaIg7Go_XypmFfY5N-sS6GOxO2-lYxfrZiEkUvLDhSwpiDGwW4bRm2WEJJhDPDhG2qS4nGFTZpZkWoneFZdKDXXdXgtyErC2v_sHuPnINZXgpc2scSplmjUw9s1hDMFE1mPGXZ7HBeFjRV0VCTDQm7E0hEH4sdHdxLLuWI.js.seam?ln=omnifaces.combined&v=1615471860000:539
select @ eNp9j9EOwjAIRb9o8r6_qS3bWFuopc1c4scbnXGmOl-4N3DIBZgVBrFVT7PeUqaIg7Go_XypmFfY5N-sS6GOxO2-lYxfrZiEkUvLDhSwpiDGwW4bRm2WEJJhDPDhG2qS4nGFTZpZkWoneFZdKDXXdXgtyErC2v_sHuPnINZXgpc2scSplmjUw9s1hDMFE1mPGXZ7HBeFjRV0VCTDQm7E0hEH4sdHdxLLuWI.js.seam?ln=omnifaces.combined&v=1615471860000:539
(anonymous) @ eNp9j9EOwjAIRb9o8r6_qS3bWFuopc1c4scbnXGmOl-4N3DIBZgVBrFVT7PeUqaIg7Go_XypmFfY5N-sS6GOxO2-lYxfrZiEkUvLDhSwpiDGwW4bRm2WEJJhDPDhG2qS4nGFTZpZkWoneFZdKDXXdXgtyErC2v_sHuPnINZXgpc2scSplmjUw9s1hDMFE1mPGXZ7HBeFjRV0VCTDQm7E0hEH4sdHdxLLuWI.js.seam?ln=omnifaces.combined&v=1615471860000:539
dispatch @ eNp9j9EOwjAIRb9o8r6_qS3bWFuopc1c4scbnXGmOl-4N3DIBZgVBrFVT7PeUqaIg7Go_XypmFfY5N-sS6GOxO2-lYxfrZiEkUvLDhSwpiDGwW4bRm2WEJJhDPDhG2qS4nGFTZpZkWoneFZdKDXXdXgtyErC2v_sHuPnINZXgpc2scSplmjUw9s1hDMFE1mPGXZ7HBeFjRV0VCTDQm7E0hEH4sdHdxLLuWI.js.seam?ln=omnifaces.combined&v=1615471860000:68
v.handle @ eNp9j9EOwjAIRb9o8r6_qS3bWFuopc1c4scbnXGmOl-4N3DIBZgVBrFVT7PeUqaIg7Go_XypmFfY5N-sS6GOxO2-lYxfrZiEkUvLDhSwpiDGwW4bRm2WEJJhDPDhG2qS4nGFTZpZkWoneFZdKDXXdXgtyErC2v_sHuPnINZXgpc2scSplmjUw9s1hDMFE1mPGXZ7HBeFjRV0VCTDQm7E0hEH4sdHdxLLuWI.js.seam?ln=omnifaces.combined&v=1615471860000:68

Reproducer Will work on this later. The combined resources handler currently makes it quite unreadable, sorry.

Environment:

  • PF Version: 10.0.0
  • JSF + version:Mojarra 2.3.14_
  • Affected browsers: ALL

To Reproduce Steps to reproduce the behavior:

will follow up

Expected behavior No console error should appear.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:20 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
mellowarecommented, May 4, 2021

@blutorange You probably want to override the destroy and refresh listeners in the widget to dispose of the current editor.

1reaction
stolpcommented, Apr 28, 2021

@blutorange : Thank you, scrollbeyondlastline indeed solved this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Editor action is run twice in Firefox #2178 - GitHub
In Firefox, this worked fine in Monaco Editor version 0.20.0, but broke in version 0.21.0. It can still be reproduced in the latest...
Read more >
Monaco Editor AddComment event fires twice - Stack Overflow
I have configured the Monaco Editor to fire an event when Ctrl+S using AddCommand: <html> <head> <meta charset="utf-8" /> <style ...
Read more >
All Docs - Quark.js
Monaco editor provides rich IntelliSense, validation and out of the box support for for HTML, CSS, SCSS, JSON, JavaScript and TypeScript. Your browser...
Read more >
Monaco Editor Monarch - Microsoft Open Source
This document describes how to create a syntax highlighter using the Monarch library. This library allows you to specify an efficient syntax highlighter,...
Read more >
1786043 – Alert Manager Monaco editor show duplicate info
Description of problem: When user make some invalid changes in Alert Manager YAML editor(Monaco editor), hover the invalid string will show duplicate error...
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