Skip to content

Cursor does not follow input when scrolling with $ionicScrollDelegate on iOS #2244

@AgDude

Description

@AgDude

This is the same problem as described in #26 and #1063. It seems that it was fixed for scrolling by the user, but if the scroll is done programatically the problem still occurs.

here is a snippet from a directive:

var scroller = $ionicScrollDelegate.$getByHandle('my-handle'),
      setTop = function(){
        var top = element[0].getBoundingClientRect().top;
        if ( top > 62){ scroller.scrollBy(0, top - 62, true); }
      };

When setTop is called, the scroll happens, but cursor stays in the original position (no longer over the input).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions