forked from MapComplete/MapComplete
		
	Fix #1808
This commit is contained in:
		
							parent
							
								
									68ea4e3d9f
								
							
						
					
					
						commit
						99af2f31b6
					
				
					 1 changed files with 6 additions and 6 deletions
				
			
		| 
						 | 
					@ -241,7 +241,7 @@
 | 
				
			||||||
    <form
 | 
					    <form
 | 
				
			||||||
      class="interactive border-interactive relative flex flex-col overflow-y-auto px-2"
 | 
					      class="interactive border-interactive relative flex flex-col overflow-y-auto px-2"
 | 
				
			||||||
      style="max-height: 75vh"
 | 
					      style="max-height: 75vh"
 | 
				
			||||||
      on:submit|preventDefault={() => onSave()}
 | 
					      on:submit|preventDefault={() =>{ /*onSave(); This submit is not needed and triggers to early, causing bugs: see #1808*/}}
 | 
				
			||||||
    >
 | 
					    >
 | 
				
			||||||
      <fieldset>
 | 
					      <fieldset>
 | 
				
			||||||
        <legend>
 | 
					        <legend>
 | 
				
			||||||
| 
						 | 
					@ -285,7 +285,7 @@
 | 
				
			||||||
            feature={selectedElement}
 | 
					            feature={selectedElement}
 | 
				
			||||||
            value={freeformInput}
 | 
					            value={freeformInput}
 | 
				
			||||||
            unvalidatedText={freeformInputUnvalidated}
 | 
					            unvalidatedText={freeformInputUnvalidated}
 | 
				
			||||||
            on:submit={onSave}
 | 
					            on:submit={() => onSave()}
 | 
				
			||||||
          />
 | 
					          />
 | 
				
			||||||
        {:else if mappings !== undefined && !config.multiAnswer}
 | 
					        {:else if mappings !== undefined && !config.multiAnswer}
 | 
				
			||||||
          <!-- Simple radiobuttons as mapping -->
 | 
					          <!-- Simple radiobuttons as mapping -->
 | 
				
			||||||
| 
						 | 
					@ -329,7 +329,7 @@
 | 
				
			||||||
                  value={freeformInput}
 | 
					                  value={freeformInput}
 | 
				
			||||||
                  unvalidatedText={freeformInputUnvalidated}
 | 
					                  unvalidatedText={freeformInputUnvalidated}
 | 
				
			||||||
                  on:selected={() => (selectedMapping = config.mappings?.length)}
 | 
					                  on:selected={() => (selectedMapping = config.mappings?.length)}
 | 
				
			||||||
                  on:submit={onSave}
 | 
					                  on:submit={() => onSave()}
 | 
				
			||||||
                />
 | 
					                />
 | 
				
			||||||
              </label>
 | 
					              </label>
 | 
				
			||||||
            {/if}
 | 
					            {/if}
 | 
				
			||||||
| 
						 | 
					@ -372,7 +372,7 @@
 | 
				
			||||||
                  feature={selectedElement}
 | 
					                  feature={selectedElement}
 | 
				
			||||||
                  value={freeformInput}
 | 
					                  value={freeformInput}
 | 
				
			||||||
                  unvalidatedText={freeformInputUnvalidated}
 | 
					                  unvalidatedText={freeformInputUnvalidated}
 | 
				
			||||||
                  on:submit={onSave}
 | 
					                  on:submit={() => onSave()}
 | 
				
			||||||
                />
 | 
					                />
 | 
				
			||||||
              </label>
 | 
					              </label>
 | 
				
			||||||
            {/if}
 | 
					            {/if}
 | 
				
			||||||
| 
						 | 
					@ -397,13 +397,13 @@
 | 
				
			||||||
            <slot name="cancel" />
 | 
					            <slot name="cancel" />
 | 
				
			||||||
            <slot name="save-button" {selectedTags}>
 | 
					            <slot name="save-button" {selectedTags}>
 | 
				
			||||||
              {#if allowDeleteOfFreeform && (mappings?.length ?? 0) === 0 && $freeformInput === undefined && $freeformInputUnvalidated === ""}
 | 
					              {#if allowDeleteOfFreeform && (mappings?.length ?? 0) === 0 && $freeformInput === undefined && $freeformInputUnvalidated === ""}
 | 
				
			||||||
                <button class="primary flex" on:click|stopPropagation|preventDefault={onSave}>
 | 
					                <button class="primary flex" on:click|stopPropagation|preventDefault={() => onSave()}>
 | 
				
			||||||
                  <TrashIcon class="h-6 w-6 text-red-500" />
 | 
					                  <TrashIcon class="h-6 w-6 text-red-500" />
 | 
				
			||||||
                  <Tr t={Translations.t.general.eraseValue} />
 | 
					                  <Tr t={Translations.t.general.eraseValue} />
 | 
				
			||||||
                </button>
 | 
					                </button>
 | 
				
			||||||
              {:else}
 | 
					              {:else}
 | 
				
			||||||
                <button
 | 
					                <button
 | 
				
			||||||
                  on:click={onSave}
 | 
					                  on:click={() => onSave()}
 | 
				
			||||||
                  class={twJoin(
 | 
					                  class={twJoin(
 | 
				
			||||||
                    selectedTags === undefined ? "disabled" : "button-shadow",
 | 
					                    selectedTags === undefined ? "disabled" : "button-shadow",
 | 
				
			||||||
                    "primary"
 | 
					                    "primary"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue