1

I have text field in mat-expansion panel. I am unable to add space when typing a word Dinbert Syndrome. When I click on space down arrow open the panel

Below is the image after typed 1st word (Arrow is intact and downwards)

enter image description here

When pressed space, no space is applied but panel opens (arrow upwards)

When clicked space, panel opens but no space is applied

Expected - Dinbert Syndrome

Text I get - DinbertSyndrome

.html

  <mat-expansion-panel-header>
              <mat-panel-title>
                <dt class="col-sm-4 record_property">Product</dt>
              </mat-panel-title>
              <mat-panel-description>
                <dd class="col-sm-8 record_property_value Product_name" id="{{genProductId(product.name)}}">
                  <internal-edit id="concept_{{ci}}_Product_{{ti}}_edit" *ngIf="product.$new" [(field)]="product.name"
                                       [elementType]="rn.productData" (fieldChange)="ProductModified(product)" cols="30" 
                                       rows="1"></internal-edit>
                </dd>
              </mat-panel-description>
            </mat-expansion-panel-header>
            

internalEdit.html

<internal-edit [editable]="true"
                   [inputTag]="'textarea'"
                   [(inputText)]="field"
                   (inputTextChange)="termModified(field)"
                   [placeholder]="'Term'"></internal-edit>

.ts

genProductId(s: string) {
    return s ? s.replace(/ /g, '_') : '';
  }

NOTE- My selenium-protractor end to end test is failing due to this.

Tejas Mehta
  • 281
  • 1
  • 4
  • 17
  • Would you share the respective code of your e2e test? I believe you can solve your problem there, instead of changing the components code to make the test work. – Tino Jun 24 '21 at 17:46
  • Hi @Tino, thanks for reply - here is the link to question - https://stackoverflow.com/questions/68104526/how-can-i-add-space-between-words-when-typing-in-protractor?noredirect=1#comment120371129_68104526 – Tejas Mehta Jun 24 '21 at 17:48
  • see https://stackoverflow.com/questions/68104526/how-can-i-add-space-between-words-when-typing-in-protractor?noredirect=1#comment120398312_68104526 – Tino Jun 24 '21 at 17:56

0 Answers0