you can easily use focus event in angular 6, angular 7, angular 8, angular 9, angular 10, angular 11, angular 12 and angular 13 application. The standard appearance is a slightly updated version of the legacy appearance that has spacing that is more . HTML <select> tag is used to create a dropdown list of options, which appears when clicking on the form element and allows the user to choose one of the options. Now we should see the cursor at the end of the text. Step 1: Install Angular App. Set caret position on init - Angular, Vue, React, Web ... - jQWidgets HTMLInputElement.setSelectionRange() - Web APIs | MDN src/app/click-me.component.ts content_copy <button type = "button" (click) = "onClickMe()" > Click me! Using ngStyle in Angular for dynamic styling - Ultimate Courses To set the position of the caret inside an inline Kendo UI Editor by using JavaScript, you can use a position index or search for a string. If the read cursor is undefined, we return -1. In the above example we have created a simple directive to set auto focus on text box. Approach: HTMLInputElement.setSelectionRange (): The HTMLInputElement.setSelectionRange () is a method that sets the start and end positions of the current text selection in an <input> or <textarea> element. JavaScript Automatically Move Cursor to Next Field When Textbox Full Make It Easy: Angular auto focus for input box - Angular The inline style for the p element replaces the background-color and color styles from the element selector. step 3: Set the mat tooltip Position using matTooltipPosition. I've been trying to fix it with no luck for a day or two and gave up.