简体   繁体   中英

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' | translate }}" 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' | translate}}" matTooltipClass="custom-tooltip">sentiment_satisfied_alt</mat-icon>
            </div>
            <a (click)="sendMessage()" [ngClass]="{'disabled': !newMessage}">
                {{ "meeting-side.send" | translate }}
            </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在此处输入图片说明

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

It's a issue related to the support of emojis in a older operating system . Only newer operating system have support for all the emojis you would expect.

A few emojis was released as part of different Unicode versions after the release of Windows 7.

It may help to fix that to use some third-party, but I don't really think it's possible to fix all the missing emojis. For example, Windows 7 has update ( KB2729094 ) which provides unicode emoji support (An update for the Segoe UI ). However, some of new emojis are still missing and they are in black and white.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM