Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dropdown tooltips don't appear if description is set #3964

Open
nbastin opened this issue Nov 7, 2024 · 0 comments
Open

Dropdown tooltips don't appear if description is set #3964

nbastin opened this issue Nov 7, 2024 · 0 comments

Comments

@nbastin
Copy link

nbastin commented Nov 7, 2024

Dropdown widgets display a tooltip (or at least have a title set in the select tag - what the browser does is up to the browser) as long as you don't set the description attribute in the code:

widgets.Dropdown(options=["one", "two"], tooltip="foo")

results in

<select id="849cda15-51eb-418e-a850-e437416aaf1c" title="foo"><option data-value="one" value="one">one</option><option data-value="two" value="two">two</option></select>

but if you set the description to force a label, then you get no tooltip on either the label or the select box itself:

widgets.Dropdown(options=["one", "two"], tooltip="foo", description="bar")

generates:

<div class="lm-Widget jupyter-widgets widget-inline-hbox widget-dropdown"><label class="widget-label" style="" for="2af4135d-ead3-452c-bb33-c20409c7101b">bar</label><select id="2af4135d-ead3-452c-bb33-c20409c7101b"><option data-value="one" value="one">one</option><option data-value="two" value="two">two</option></select></div>

This is with ipywidgets 8.1.5, and jupyterlab 4.2.4 (no extensions).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant