fixed concernement field recording

This commit is contained in:
2025-06-03 12:38:26 +02:00
parent b9f9551efa
commit cc943c5776
6 changed files with 129 additions and 15 deletions

View File

@@ -40,7 +40,8 @@ export default {
...mapState(ConcernementsStore,['map_mode',
'opened_concernement',
'concernements_loaded',
'allSuperpositions_clustered']),
'allSuperpositions_clustered',
'concernement_is_updating_nid']),
...mapState(CommonStore,['cartouch_width']),
//
main_cid_eid () {
@@ -203,7 +204,20 @@ export default {
},
closeConcernement(){
this.resetConcernementOpened();
// unfocus any active element to trigger recording if needed
document.activeElement.blur();
// setTimeout to let time for editable fields to focus out and record changes
this.waitForUpdatingEnded();
},
waitForUpdatingEnded(){
setTimeout(() => {
if (!this.concernement_is_updating_nid) {
this.resetConcernementOpened();
} else {
this.waitForUpdatingEnded();
}
}, 1);
}
},
components: {