fixed concernement field recording
This commit is contained in:
@@ -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: {
|
||||
|
Reference in New Issue
Block a user