Callback not firing until user clicks anywhere

Hello,
We are developing a complex dataviz app using dash.
I found that some callbacks are not fired even though a property in its inputs has been changed by another callback.
Then if I click anywhere on the page (not especially on a control), it fires the callback.
While waiting for the click, the browser’s tab title displays “Updating…”, like during a callback.

Has anyone seen a similar behavior ?

Thank you.

1 Like

HI @VictorCov, I did not notice something like that up to now. For further help it’d be good to post your corresponding code snippet.

Hello AIMPED,
Thank you for your answer.
Our app is very complex and I tried making a small example but it didn’t reproduce the problem.

I found that while the app is stuck, waiting for a click, it is stuck in this code in the file dash_renderer.v2_9_2m1680265169.dev.js:

{
	key: "componentDidMount",
	value: function componentDidMount() {
		var _this$props = this.props
			, dispatch = _this$props.dispatch
                	, reloadRequest = _this$props.reloadRequest;
                var _this$state = this.state
                	, disabled = _this$state.disabled
                	, interval = _this$state.interval;
                if (!disabled && !this.state.intervalId) {
                	var intervalId = window.setInterval(function() {
                        	// Prevent requests from piling up - reloading can take
                        	// many seconds (10-30) and the interval is 3s by default
                        	if (reloadRequest.status !== 'loading') {
                        		dispatch((0,
                                	_actions_api__WEBPACK_IMPORTED_MODULE_4__["default"])('_reload-hash', 'GET', 'reloadRequest'));
                                }
			}, interval);
			this.setState({
				intervalId: intervalId
			});
		}
	}
}

More specifically, looping at the following lines:

if (reloadRequest.status !== 'loading') {
	dispatch((0,
       	_actions_api__WEBPACK_IMPORTED_MODULE_4__["default"])('_reload-hash', 'GET', 'reloadRequest'));
}

What could be the cause of this behavior?
Thank you.