Plotly selection not fully working when using facets

Hello,

I’m trying to use the plotly on_selection handler, in a figure with facets.
The handler does seem to work in the first facet, but not in the other facets.

An example below (based on Selection events in Python/v3)
Using the cars data set, I create a scatter plot using “Number of Forward Gears” as facet column.

import plotly.graph_objs as go
import plotly.offline as py
import plotly.express as px

import pandas as pd
import numpy as np
from ipywidgets import interactive, HBox, VBox

py.init_notebook_mode()
df = pd.read_csv('https://raw.githubusercontent.com/jonmmease/plotly_ipywidget_notebooks/master/notebooks/data/cars/cars.csv')

df_range = df['City mpg'].max() - df['City mpg'].min()
df["x"] = df["City mpg"].apply(lambda x : x + np.random.rand()/10 * df_range)
df["y"] = df["City mpg"].apply(lambda x : x + np.random.rand()/10 * df_range)
df

fig = px.scatter(df, x="x", y="y", facet_col="Number of Forward Gears")
fig.update_layout(
            showlegend=False,
            dragmode="select",
            clickmode="select"
        )
fig = go.FigureWidget(fig)

def selection_fn(trace,points,selector):
    print(selector)
    
for scatter in fig.data:
    scatter.marker.opacity = 0.1
    scatter.on_selection(selection_fn)
    
fig

When you select in the first facet, the console log shows the selected xrange and yrange

BoxSelector(xrange=[14.674226120973662, 25.12143134859872],
            yrange=[14.112620683088675, 21.95971264686313])

However, from the second facet on, the BoxSelector displays some unuseful data :

BoxSelector(xrange=<object object at 0x000001BCD8F1D930>,
            yrange=<object object at 0x000001BCD8F1D930>)

Does someone have an idea what could be the cause, and if there’s a workaround ?
Working with subplots shows the same behavior, by the way.

Thank you

Bart