Quantcast
Channel: 🎛️ Dash - Plotly Community Forum
Viewing all articles
Browse latest Browse all 6271

Is there a way to deselect a dash component (i.e. remove focus)?

$
0
0

Hey all

I’m having some trouble with tooltips and dash bootstrap buttons in my app.

The problem:
If I add a tooltip to my dcc button that triggers a modal, when the modal closes, the tooltip annoyingly persists on the button despite the mouse being somewhere else on the screen.

It’s like the tooltip jams on as if the button had been selected by manually scrolling through the components using the tab key, but it was NOT selected by the keyboard, and so I don’t want to the tooltip to remain ‘on’. The only way to hide the tooltip after the modal is closed it is to hover the mouse over and off the button, or manually tab to another component.

This has cost me 2 hours of pain already and I still can’t solve it. I think it’s something to do with the automatic ‘focus’ or ‘outline’. I’ve tried manually switching button active state on/off but it’s not that. It’s the focus ring around the button that causes the pop up to persist after the modal closes. Im sure there must be an easier way then writing custom CSS to get around this.

Is there a way in dash to manually de-focus the browser from a button component?? (different to active state)

or

Is there a way to manually select a page component (i.e. reset the selection to the initial page load state where no buttons have been selected)?

image

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 6271

Trending Articles