Skip to content

Commit

Permalink
Fixes the tag editor (from 6.x branch)
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianStehle committed Aug 15, 2022
2 parents a8da5c6 + 9521736 commit 9fe1e22
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [7.0.3] - 2022-08-15

### Fixed

* **UI**: Fixes the tag editor.

## [6.14.0] - 2022-08-15

### Fixed

* **UI**: Fixes the tag editor.

## [7.0.2] - 2022-08-09

### Fixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,12 +244,16 @@ export class TagEditorComponent extends StatefulControlComponent<State, Readonly
}

public resetSize() {
if (!this.inputElement?.nativeElement) {
return;
}

const textValue = this.inputElement.nativeElement.value;

const widthText = this.textMeasurer.getTextSize(textValue);
const widthTextValue = this.textMeasurer.getTextSize(textValue);
const widthPlaceholder = this.textMeasurer.getTextSize(this.placeholder);

const width = Math.max(widthText, widthPlaceholder);
const width = Math.max(widthTextValue, widthPlaceholder);

if (width < 0) {
return;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

/*
* Squidex Headless CMS
*
Expand Down

0 comments on commit 9fe1e22

Please sign in to comment.