Closed ssesselmann closed 11 months ago
Yay... 😀, three days of messing around and trying all kinds of botches, I found the problem 👍
I had used a deprecated command html.Br(' ') to insert a line of space on my problem tab0, and for some reason this caused confusion of the tabs. At first I thought it might have been a coincidence, but I changed it back and the problem was repeatable.
Replaced html.Br() with html.P() and now the tabs work as expected.
Weird and unexpected bug 🐞
Glad you figured this out @ssesselmann - FWIW, when I insert html.Br(" ")
in either the main layout or a callback result and run in debug mode (app.run(debug=True)
), I see this error displayed in the browser:
br is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.
I have a script using six tabs tab_0 to tab_5, the program opens up correctly on the default tab0 and tabs 1,2,3,4 & 5 appear to work correctly, until I click back on tab_0 when it briefly renders tab_0 immediately followed by a random tab. repeated clicking will eventually get me to tab_0. This only happens on the first tab.
I added some print statements for debugging and it shows how tab_0 is immediately followed by another tab.
Any help appreciated.
DEBUGGING: Rendering content of tab_0 Showing tab0 .... Rendering content of tab_1 Showing tab1.... From callback on tab0; tab_1
Note: It appears this problem is happening when dcc.Interval() is active on the tab you are coming from.