diff --git a/src/core/js/ext_qrcode.js b/src/core/js/ext_qrcode.js
index 56f49d44e94126942653eefee6a6e105769c20d3..d075ef884a89d407cb1e79b98f2045c6d4e25a26 100644
--- a/src/core/js/ext_qrcode.js
+++ b/src/core/js/ext_qrcode.js
@@ -163,16 +163,23 @@ var ext_qrcode = function ($, connection, getEntityVersion, getEntityID, QRCode,
         $(entity).find(`.${_buttons_list_class} .${_qrcode_button_class}`).remove();
     }
 
+    var _init = function () {
+        for (let entity of $(".caosdb-entity-panel")) {
+            remove_qrcode_button(entity);
+            add_qrcode_to_entity(entity);
+        }
+    }
+
     /**
      * Initialize this module and append a QR Code button to all entities panels on the page.
      *
      * Removes all respective buttons if present before adding a new one.
      */
     var init = function () {
-        for (let entity of $(".caosdb-entity-panel")) {
-            remove_qrcode_button(entity);
-            add_qrcode_to_entity(entity);
-        }
+        _init();
+
+        // edit-mode-listener
+        document.body.addEventListener(edit_mode.end_edit.type, _init, true);
     };
 
     return {