From ab7df6e040cb2697110987c845b7e0c707791749 Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Tue, 29 Apr 2025 13:44:39 +0200 Subject: [PATCH] disable keyboard controls for pannellum viewer, fixes #11001 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit this makes it similar to how the non 360° viewer and mapillary's 360° viewer work, allowing regular iD keyboard shortcuts to be used even when the focus is on the photo viewer --- modules/services/pannellum_photo.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/services/pannellum_photo.js b/modules/services/pannellum_photo.js index 914773ce8..3418c0f8f 100644 --- a/modules/services/pannellum_photo.js +++ b/modules/services/pannellum_photo.js @@ -19,8 +19,7 @@ export default { .attr('class', 'photo-frame pannellum-frame') .attr('id', 'ideditor-pannellum-viewer') .classed('hide', true) - .on('mousedown', function(e) { e.stopPropagation(); }) - .on('keydown', function(e) { e.stopPropagation(); }); + .on('mousedown', function(e) { e.stopPropagation(); }); if (!window.pannellum) { await this.loadPannellum(context); @@ -29,7 +28,8 @@ export default { const options = { 'default': { firstScene: '' }, scenes: {}, - minHfov: 20 + minHfov: 20, + disableKeyboardCtrl: true }; _pannellumViewer = window.pannellum.viewer('ideditor-pannellum-viewer', options); @@ -56,7 +56,7 @@ export default { this.event = utilRebind(this, dispatch, 'on'); return this; - }, + }, loadPannellum: function(context) { const head = d3_select('head');