We are trying to click on a Krpano Layer, which is a child of a hotspot, using Playwright, however 1 out of 5 times the click is registered as a click on the panorama instead of click on the layer. The code for our layer is:
Code
const layer = panorama._pano.addLayer(CONFIRM_LOCATION_LAYER_ID);
layer.parent = `hotspot[${CONFIRM_LOCATION_ARROW_ID}]`;
layer.alpha = 1;
layer.background = false;
layer.zorder = 99;
layer.renderer = 'css3d';
layer.handcursor = true;
layer.type = 'text';
layer.align = 'centertop';
layer.y = -20;
layer.onclick = onConfirm;
layer.html = "<div class='confirm-button' style='z-index: 9999'>Confirm</div>";
Display More
We tried to click on .confirm-button container using await page.locator('.confirm-button').first().click({force: true}) as well as clicking to the center of the element using await page.mouse.click(x, y).
Does anyone have any ideas about what might be causing this? We’re running krpano 1.21.2 , but have also tried it on other versions with no difference.