Our pure JavaScript Scheduler component


Post by striker »

Hello again.
We are facing issue with tooltips again, but only on production (builded version).

Dragging event is throwing errors in console.

draganddroperror.gif
draganddroperror.gif (835.76 KiB) Viewed 366 times
31main.dc5e89066d813e8b.js:1 TypeError: Cannot set properties of undefined (setting 'allowTargetOut')
    at onDrag (src_app_shared_components_filter-panel_shared_services_filter-panel-url-query-params_service_-4ed58d.ced34b17ff16374d.js:44:326548)
    at o.trigger (src_app_shared_components_filter-panel_shared_services_filter-panel-url-query-params_service_-4ed58d.ced34b17ff16374d.js:1:487531)
    at o.update (src_app_shared_components_filter-panel_shared_services_filter-panel-url-query-params_service_-4ed58d.ced34b17ff16374d.js:1:907112)
    at o.internalMove (src_app_shared_components_filter-panel_shared_services_filter-panel-url-query-params_service_-4ed58d.ced34b17ff16374d.js:1:906247)
    at onMouseMove (src_app_shared_components_filter-panel_shared_services_filter-panel-url-query-params_service_-4ed58d.ced34b17ff16374d.js:1:906542)
    at HTMLDocument.v (src_app_shared_components_filter-panel_shared_services_filter-panel-url-query-params_service_-4ed58d.ced34b17ff16374d.js:1:586530)
    at H.invokeTask (polyfills.9097ed6e2365f309.js:1:21188)
    at Object.onInvokeTask (main.dc5e89066d813e8b.js:1:4374147)
    at H.invokeTask (polyfills.9097ed6e2365f309.js:1:21109)
    at G.runTask (polyfills.9097ed6e2365f309.js:1:16569)
    
draganddroperror.gif
draganddroperror.gif (835.76 KiB) Viewed 366 times

I tried investigate the problem, and removing this is fixing the problem:

        eventDrag: <Partial<EventDragConfig>> {
	// this below
          tip: {
            align : {
              minHeight : null
            }
          },

We need to use again:

      listeners: {
        eventDragStart() {
          instance.features.eventDrag.tip['align'].minHeight = instance.features.eventDrag.tip['align'].minHeight = null;
        }
      },

please fix it

SchedulerPro 5.0.1


Post by mats »

How can we reproduce this? If this only happens in your production environment, it might be something in your build steps that corrupt our code. Are you using Angular by any chance?


Post by Animal »

The only way this can happen is if the tooltip show on onDragStart is somehow vetoed, and then onDrag tries to realign it when it has never been shown. I can put a guard in the setting of lastAlignTarget.allowTargetOut if there is no lastAlignTarget in onDrag.

But I never like to just put a plaster over a problem without understanding the problem.

I'd like to drill down to how onDragStart doesn't show the tip when it calls me.tip.showBy(tipTarget). That will align it and set lastAlignTarget. What listeners might be on the tooltip?


Post Reply