setSelectionRange() doesn't move cursor (and selection) to the visible input area

Fixed Issue #15637833

Details

Author
Nikolay A.
Created
Jan 26, 2018
Privacy
This issue is public.
Found in
  • Microsoft Edge
  • Internet Explorer
  • Chrome
Found in build #
16.16299
Reports
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

  1. Open the following sample https://jsfiddle.net/Lipata/c02ux411/3/
  2. Notice that the cursor is not visible. It is moved to 9th position, but the text is not moved and the cursor is hidden.
  3. The same problem is valid when setSelectionRange() is called inside a event handler (e.g. keypress). At the first point I though the problem was caused because the preventDefault() is called, but I guess the root problem is the one with the setSelectionRange() method.

Actual Result:
The selection/cursor is not visible, when the text width is more than the input width.

Expected Result:
The text is moved so that the cursor and current selections are visible, while in Edge I can reproduce both.

In IE11 I’m only able to reproduce the problem with setSelectionRange() in keypress event, while in Edge - both.

Attachments

0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “James M.”

    • Hello,

      Thank you for providing this information about the issue. We are pleased to report this feature is fixed in Edge 17063 and is available in our Insider Preview build.

      Best Wishes,
      The MS Edge Team

    • Thank you, James.

      That sounds great! Thank you for the fast answer!

      Best regards,
      Nikolay Alipiev

    • Microsoft Edge Team

      Changed Status to “Fixed”

    You need to sign in to your Microsoft account to add a comment.

    Sign in