Tooltips throw exceptions when using vector shapes with the canvas renderer after #8247
See original GitHub issueChecklist
- 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
- Use latest
main
(9d1a841 at the time of creating this issue) - Set up a map with canvas renderer and a vector shape, like a rectangle.
- Bind a tooltip to the vector. Check JS console.
- Move mouse over the vector. Check JS console.
- 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:
- Created a year ago
- Comments:14 (7 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@mourner @jonkoops I will share tomorrow morning a fix
Yeah, that’s the exact same stack trace I had. Forgot to include it above.