Skip to content

Commit d320757

Browse files
committed
Upgrade Leaflet 1.9.3 to 1.9.4
1.9.3's _addFocusListenersOnLayer calls layer.getElement() unguarded, so any GeoJSON layer containing a nested FeatureGroup throws "t.getElement is not a function". 1.9.4 guards the call. This also restores verify_js_logs() in the MultiPoint tooltip test, which had to omit it for that reason. Because the driver fixture is session-scoped, the unread error stayed in the browser log and surfaced in whichever later test read it first — which is why test_notebook[coordinate_ordering.md] has been failing on main despite having no tooltips of its own.
1 parent 3922b31 commit d320757

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

folium/folium.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
)
2626

2727
_default_js = [
28-
("leaflet", "https://cdn.jsdelivr.net/npm/leaflet@1.9.3/dist/leaflet.js"),
28+
("leaflet", "https://cdn.jsdelivr.net/npm/leaflet@1.9.4/dist/leaflet.js"),
2929
("jquery", "https://code.jquery.com/jquery-3.7.1.min.js"),
3030
(
3131
"bootstrap",
@@ -38,7 +38,7 @@
3838
]
3939

4040
_default_css = [
41-
("leaflet_css", "https://cdn.jsdelivr.net/npm/leaflet@1.9.3/dist/leaflet.css"),
41+
("leaflet_css", "https://cdn.jsdelivr.net/npm/leaflet@1.9.4/dist/leaflet.css"),
4242
(
4343
"bootstrap_css",
4444
"https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/css/bootstrap.min.css",

tests/selenium/test_multipoints_tooltip_selenium.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,4 @@ def test_geojson_multipoint_tooltip(driver):
5959
tooltip = driver.wait_until(".leaflet-tooltip.foliumtooltip")
6060
assert "multipoint" in tooltip.text
6161

62-
# No verify_js_logs() here: Leaflet 1.9.3 (our pin) throws
63-
# "t.getElement is not a function" from _addFocusListenersOnLayer for any
64-
# GeoJSON layer containing a nested FeatureGroup, independent of this fix.
65-
# Guarded upstream in 1.9.4.
62+
driver.verify_js_logs()

0 commit comments

Comments
 (0)