kolibri icon indicating copy to clipboard operation
kolibri copied to clipboard

fixed textarea scrollbar issue

Open Schollkolade opened this issue 10 months ago • 2 comments

:ballot_box_with_check: Definition of Done checklist

  • [x] Meaningful title for the release notes
  • [x] Pull request is linked to a problem
  • [x] All changes relate to the problem
  • [ ] A11y tests performed successfully or not relevant
  • [ ] Manual test performed successfully (by reviewer) or not relevant

Schollkolade avatar Apr 15 '24 12:04 Schollkolade

Netlify Draft Deployment URL: https://664724fd11b5259cfc6c1183--kolibri-public-ui.netlify.app Logs: https://app.netlify.com/sites/kolibri-public-ui/deploys/664724fd11b5259cfc6c1183

github-actions[bot] avatar Apr 15 '24 12:04 github-actions[bot]

Die Screenshots für Textarea Rows = 1 müssen genauso hoch bleiben, wie ein TextInput. Dazu müssen wir das Problem der Änderung im CSS analysieren.

Aktuell ist keine Höhe definiert, weder über CSS noch über ein rows-Attribut. Daher wird die Höhe gerade standardmäßig auf "zwei Zeilen" gesetzt, was die Änderung zur vorherigen Implementierung zur Folge hat.

Wenn der Standard "eine Zeile" sein soll, könnte die einfachste Lösung sein, die rows auf 1 zu setzen, so lange nicht anders definiert ist:

if (this._adjustHeight === true && this.ref /* SSR instanceof HTMLTextAreaElement */) {
	this._rows = this.state?._rows && this.state._rows > increaseTextareaHeight(this.ref) ? this.state._rows : increaseTextareaHeight(this.ref);
-}
+} else if (!this._rows) {
+	this._rows = 1;
+}```

sdvg avatar Apr 18 '24 07:04 sdvg