dimanche 1 novembre 2020

angular emoji picker not working on windows 7

I have an angular project, In my project I used @joeattardi/emoji-button plugin to add emoji picker to my chat box

this is template

<form action="" class="type-message">
        <input type="text" placeholder="meeting-side.write-message" id="newMessage"
            (keyup.enter)="sendMessage()" [(ngModel)]="newMessage" [ngModelOptions]="{standalone: true}"  autocomplete="off" required>
        <div class="actions-row">
            <div class="icons-actions">
                <mat-icon id="emojiButton" matTooltip="meeting-side.add-emoji" matTooltipClass="custom-tooltip">sentiment_satisfied_alt</mat-icon>
            </div>
            <a (click)="sendMessage()" [ngClass]="{'disabled': !newMessage}">
                
            </a>
        </div>
    </form>

and in my component.ts code I added this code

ngAfterViewInit() {
    this.cdRef.detectChanges();

    let button = document.querySelector('#emojiButton') as HTMLButtonElement;
    let picker = new EmojiButton({
      autoHide: false
    });
    
    let input = document.querySelector('#newMessage') as HTMLInputElement;

    picker.on('emoji', emoji => {
      this.newMessage += emoji;
    });

    button.addEventListener('click', () => {
      picker.togglePicker(button);
    });
  }

every thing worked fine when I test my app on linux, windows 10, and mac, but when I test on windows 7 it is look like this enter image description here

please help me how can I make this plugin to support windows 7 Or any suggestion to any MIT plugin support all Operating systems.

thank you




Aucun commentaire:

Enregistrer un commentaire