Search code examples
roomle

moving the camera with shift only working after interaction in iframe


in the configurator we can move the camera with shift + dragging, but if we have the configurator inside the iframe in our website, this functionality is not working, until I interacted in any way with the ui of the configurator (no matter if zooming, changing a param, etc.)

any idea why this could be the case? I could not find any place where this is happening in the code


Solution

  • I guess it's due to the lack of focus on the iframe. When the iframe is not focused it can't react on key events.

    You could try the solution proposed here: Setting focus to iframe contents