Skip to content

Commit

Permalink
Use (input) instead of (keyUp)
Browse files Browse the repository at this point in the history
  • Loading branch information
tkleinke committed Dec 20, 2024
1 parent 9c7e42f commit 3936158
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@
<textarea *ngIf="fieldContainer.geometry && fieldContainer.geometry.type !== ''"
class="form-control geometry-coordinates-textarea"
[(ngModel)]="coordinates"
(keyup)="parseCoordinates(false)"
(input)="parseCoordinates(false)"
(blur)="parseCoordinates(true)">{{coordinates}}</textarea>
</div>
2 changes: 1 addition & 1 deletion desktop/src/app/components/help/help.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<input class="form-control"
placeholder="Suchen..."
i18n-placeholder="@@widgets.searchBar.placeholder"
(keyup)="onSearchInputKeyUp($event, $event.target.value)">
(input)="onSearchInputKeyUp($event, $event.target.value)">
<div class="btn-group-vertical">
<div class="btn btn-primary browse-search-results-button"
[class.disabled]="!hasSearchResults"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[(ngModel)]="q"
(focus)="focused = true"
(blur)="focused = false"
(keyup)="onKeyUp($event)"
(input)="onInput($event)"
name="searchInput"
type="text"
placeholder="Suchen..."
Expand Down
2 changes: 1 addition & 1 deletion desktop/src/app/components/import/import.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<input class="form-control" id="importUrlInput"
type="text"
[(ngModel)]="importState.url"
(keyup)="updateFormat()">
(input)="updateFormat()">
</div>

<div *ngIf="!importState.format" class="import-info" i18n="@@import.format.info">
Expand Down
2 changes: 1 addition & 1 deletion desktop/src/app/components/resources/list/row.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export class RowComponent implements AfterViewInit {
}


public async onKeyUp(event: KeyboardEvent, fieldName: string) {
public async onInput(event: KeyboardEvent, fieldName: string) {

this.setValue(fieldName, event.target['value']);

Expand Down
4 changes: 2 additions & 2 deletions desktop/src/app/components/resources/list/row.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@
[value]="document.resource.identifier"
(focus)="startEditing('identifier', document.resource.identifier)"
(blur)="stopEditing('identifier', document.resource.identifier)"
(keyup)="onKeyUp($event, 'identifier')"
(input)="onInput($event, 'identifier')"
(dblclick)="$event.stopPropagation();" class="form-control form-control-sm identifier-input">
</div>
<div *ngIf="!shortDescriptionValuelist" class="input-field">
<input [value]="getShortDescription()"
(focus)="startEditing('shortDescription', document.resource.shortDescription)"
(blur)="stopEditing('shortDescription', document.resource.shortDescription)"
(keyup)="onKeyUp($event, 'shortDescription')"
(input)="onInput($event, 'shortDescription')"
(dblclick)="$event.stopPropagation();"
class="form-control form-control-sm">
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
[class.small-search-input]="extendedSearch"
[class.big-search-input]="!isFilterMenuAvailable()"
[(ngModel)]="q"
(keyup)="onKeyUp($event)"
(input)="onInput($event)"
(focus)="focused = true; showSuggestions();"
(blur)="focused = false"
name="searchInput"
Expand Down
2 changes: 1 addition & 1 deletion desktop/src/app/components/widgets/search-bar.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export class SearchBarComponent implements OnChanges {
public isAllCategoriesOptionVisible = () => this.filterOptions && this.filterOptions.length > 1;


public onKeyUp(event: KeyboardEvent) {
public onInput(event: KeyboardEvent) {

if (['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Enter', 'Escape'].includes(event.key)) {
return;
Expand Down
2 changes: 1 addition & 1 deletion desktop/src/app/components/widgets/search-bar.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="input-group">
<input #searchInput
[(ngModel)]="q"
(keyup)="onKeyUp($event)"
(input)="onInput($event)"
name="searchInput"
type="text"
class="form-control search-bar-input"
Expand Down

0 comments on commit 3936158

Please sign in to comment.