2

I want have action like this : user click item in popup, popup close and mouse pointer to id in this screen. This is example, user click in this: :user click in this

and mouse auto change position to this item have id 41

change position to id 41

I used bottom-sheet for first picture

<mat-nav-list>
    <a mat-list-item (click)="openLink($event, item)" *ngFor="let item of data_api; let i = index">
        <span mat-line>id : {{ item.id }}</span>
        <span mat-line>{{ item.note }}</span>
    </a>

</mat-nav-list>

and second is simple table mat-table

I dont know how to do it. Thank you. I used angular 7

Ngoc Pham
  • 1,408
  • 9
  • 18

2 Answers2

1

It is unfortunately not possible to move the mouse pointer from client-side script.

Here is a similar question:

jQuery Set Mouse Position (not cursor position)

0

isn't possible programmatically move the user cursor, think about what security issues can face an user that sees his cursor moved to your site.

I think you can find a lot of examples that can explain you why this practice is dangerous googling your question (watch this: Move the mouse pointer to a specific position?).

I'm afraid you should figure out something different for your site, good luck.

Simo
  • 305
  • 2
  • 9
  • As alternative UX you can propagate the selected ID from the dialog to the component with the table then scroll the table to the right position, that's not what you requested, but it will improve user experience for sure. – Simo Mar 01 '19 at 09:49