Our app is based on HTML and running inside Android webview, so basically it is a mobile web page running on a Chrome app.
As the following image shows, users can long tap to start a text selection and drag the blue cursor to change the selection range.
Whenever user stops drag the cursor, our app will do a range check to make sure the user didn't select into the part we don't want them to. If user did select into some part that not allowed to, we will change the selection range programmatically, as the code showing below:
More specifically, we will change the range after certain element. The problem is, once we programmatically changed the selection range, the blue cursor disappear. But, we want user is able to drag the blue cursor to change the selection after we "adjust" the scope of the selection.
So, my question is: How to show selection cursor after change the range of selection programmatically?
PS: 1.We can not use user-selection:none method. 2.If you have any other approach, please share with us.