maikschneider / bw_focuspoint_images

With this TYPO3 extension you can create responsive image maps in the backend. This extension ships an image editor that can be used to add areas and information to an image.
5 stars 1 forks source link

Backend Loading/Timing Issue with an inline Module. #22

Closed eibiflo closed 2 months ago

eibiflo commented 2 months ago

I discovered the extension and really love the concept. I'm still using TYPO3 11, and I've noticed that the editor only fully loads 6-8 times out of 10 attempts. The other times, something goes wrong with the initial loading, and all the points are at X:0 at the top.

I also don't get any JavaScript errors, and if I disable my cache in the console, it works again on the next load, but I can't expect an editor to require this workaround. Is this problem already known? Is there a better workaround?

Not Success: image Success: image

maikschneider commented 2 months ago

Ah yes, I remember the issue. When having the problem, a small resize of the browser instantly fixes the boxes. I guess it has something to do with the event binding of the Modal. The problem was gone when switching to ES6 in v12. I'm not sure if I'll have a deeper look into it.. Maybe a dirty setTimeout that triggers the resize event would be sufficient

eibiflo commented 2 months ago

Based on the context and your suggestions, it appears that overriding the NodeRegistry to adjust the JavaScript might be the most straightforward solution?

Alternatively, implementing a modification through an X-Class specifically for Blueways\BwFocuspointImages\Form\Element\InputFocuspointElement::class is another potential route?

Which approach would you recommend, im using a Deployment System so i cannot change the File directly.

maikschneider commented 2 months ago

Uh, I would always recommend to create a fork and configure it to run in your installation. This way, you can easily make adjustments and create a pull requests. When it's merged, you can drop your fork. Thanks for looking into it, good luck!