diff --git a/docs/release-notes-player.txt b/docs/release-notes-player.txt index 259b6b8f5b9d701b7e73be573401101bd2bd5843..24a1962adebaaea862b178a07987059ee45ec2bc 100644 --- a/docs/release-notes-player.txt +++ b/docs/release-notes-player.txt @@ -4,6 +4,7 @@ Player - Fix the playability of dependent audios and videos - Fix storing/restoring the playback time of audios and videos - Fix the response status when re-entering the unit +- Fix position of virtual keyboard for text areas 1.11.0 - For spelling element use the same font properties for input field and button diff --git a/projects/player/src/app/components/element-container/element-container.component.html b/projects/player/src/app/components/element-container/element-container.component.html index 25a254a47565c80a9d856b2f1f9444f5e17be1a8..7786acf735301b49dc09558420250e9f4d0da02d 100644 --- a/projects/player/src/app/components/element-container/element-container.component.html +++ b/projects/player/src/app/components/element-container/element-container.component.html @@ -10,6 +10,7 @@ [cdkConnectedOverlayOpen]="isKeyboardOpen"> <app-keyboard cdkDrag [inputComponent]="focussedInputElement" + [inputType]="elementModel.type" [preset]="keyboardLayout"> </app-keyboard> </ng-template> diff --git a/projects/player/src/app/components/keyboard/keyboard.component.css b/projects/player/src/app/components/keyboard/keyboard.component.css index 367bd9b5628f43460ec908f95ec5d25f5cd39a73..223457a2428eb65565b21a4e392d1efa25231f90 100644 --- a/projects/player/src/app/components/keyboard/keyboard.component.css +++ b/projects/player/src/app/components/keyboard/keyboard.component.css @@ -1,6 +1,5 @@ .keyboard-container{ margin-top: 20px; - margin-bottom: 40px; background-color: white; border: lightgray solid 1px; border-radius: 3px; diff --git a/projects/player/src/app/components/keyboard/keyboard.component.html b/projects/player/src/app/components/keyboard/keyboard.component.html index 182c78456049757af063db6c4728aec9d64d30df..08fa22cf94791fa6ffcbe69e5f9c4af75661bc52 100644 --- a/projects/player/src/app/components/keyboard/keyboard.component.html +++ b/projects/player/src/app/components/keyboard/keyboard.component.html @@ -1,4 +1,6 @@ <div class="keyboard-container" + [style.margin-bottom.px]="inputType === 'text-area' ? + inputComponent.clientHeight : inputComponent.clientHeight + 20" (mousedown)="onMouseDown($event, false)"> <div class="keyboard-header"></div> <div class="keyboard-inner-container" diff --git a/projects/player/src/app/components/keyboard/keyboard.component.ts b/projects/player/src/app/components/keyboard/keyboard.component.ts index 6a2f05f567d8deb7c932c9cca3a9334c008f5e93..c0919d92b6292bad3bfb3a14014098fb27ecd1ab 100644 --- a/projects/player/src/app/components/keyboard/keyboard.component.ts +++ b/projects/player/src/app/components/keyboard/keyboard.component.ts @@ -8,6 +8,7 @@ import { Component, Input } from '@angular/core'; export class KeyboardComponent { @Input() preset!: 'french' | 'numbers' | 'numbersAndOperators' | 'comparisonOperators' | 'none'; @Input() inputComponent!: HTMLTextAreaElement | HTMLInputElement; + @Input() inputType!: 'text-field' | 'text-area'; onMouseDown = (event: MouseEvent, stopPropagation: boolean): void => { event.preventDefault();