hawkerm / monaco-editor-uwp

A Windows Runtime Component wrapper around the web-based Monaco Editor.
MIT License
152 stars 36 forks source link

HoverProvider duplicates when Detach/Attach Editor #41

Closed hawkerm closed 3 years ago

hawkerm commented 4 years ago

I think this is related to the creation/descruction of the ModelHelper in the Loaded/Unloaded events, they also feel unnecessary, but removing them causes the HoverProvider to break entirely.

Should investigate cleaning this up and resolving this bug.

hawkerm commented 4 years ago

After the optimizations to the CssStyleBroker I'm not noticing this behavior anymore... though it could be related to if we re-create the style object for every decoration. Will have to test some more...

hawkerm commented 3 years ago

Still seeing this, repro steps on beta branch:

  1. hover over 'Hit' word
  2. Click Detach
  3. Click Attach
  4. hover again see duplicate:

image

hawkerm commented 3 years ago

Think this is an issue with the Loading event in the sample firing multiple times, testing out a fix to the sample.

The sample has another issue with the condition not being re-initialized in the remove/add scenario. (Edit: Nope, my condition is fine as it's re-setup in the loading event which fires in that scenario.)