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.

Tooltips throw exceptions when using vector shapes with the canvas renderer after #8247

See original GitHub issue

Checklist

  • I’ve looked at the documentation to make sure the behavior isn’t documented and expected.
  • I’m sure this is an issue with Leaflet, not with my app or other dependencies (Angular, Cordova, React, etc.).
  • I’ve searched through the current issues to make sure this hasn’t been reported yet.
  • I agree to follow the Code of Conduct that this project adheres to.

Steps to reproduce

  1. Use latest main (9d1a841 at the time of creating this issue)
  2. Set up a map with canvas renderer and a vector shape, like a rectangle.
  3. Bind a tooltip to the vector. Check JS console.
  4. Move mouse over the vector. Check JS console.
  5. Move mouse out of the vector. Tooltip does not disappear.

Expected behavior

Tooltip does not fail to initialise or when reacting to events. They do not require DOM elements to function.

Current behavior

Exceptions thrown on: tooltip initialisation, mouse events due to getElement calls introduced in #8247 671ebdf on a canvas-rendered shape (getElement is defined on the class, but has no element to return).

Minimal example reproducing the issue

https://codepen.io/alex4401/pen/XWqpKMW

Environment

  • Leaflet version: main 9d1a841
  • Browser (with version): Firefox 104.0.2, but got user reports from all other browsers
  • OS/Platform (with version): Arch Linux

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
Falke-Designcommented, Sep 30, 2022

@mourner @jonkoops I will share tomorrow morning a fix

1reaction
alex4401commented, Sep 28, 2022

Yeah, that’s the exact same stack trace I had. Forgot to include it above.

Read more comments on GitHub >

github_iconTop Results From Across the Web

mapbox-gl | Yarn - Package Manager
Mapbox GL JS is a JavaScript library for interactive, customizable vector maps on the web. It takes map styles that conform to the...
Read more >
Untitled
Emmanuel karaoke descargar, Arnold schwarzenegger saying do it now, B w engineering york, Mediterranean catering menus, Bujin yamato render, Pioneer again ...
Read more >
Diff - 175bf817db..b032878ebd - chromium/src - Git at Google
Build(visual_rects_); if (!retain_visual_rects_) - // This clears both the vector and the vector's capacity, since - // visual_rects won't be used anymore.
Read more >
DataGrid.cs - Reference Source - Microsoft
ComponentModel; using System.Diagnostics; using System.Security; using System.Security.Permissions; using System.Text; using System.Windows.
Read more >
Chapter 36. What is New? - DVT Eclipse IDE
DVT-17508 "SWT Resource not properly disposed" exception is thrown when ... DVT-14227 Refined tooltip comment rendering when using JavaDoc and Natural Docs.
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