xamarin/Xamarin.Forms

WebView losing selection on iOS on button tap

オープン

#5,175 opened on 2019/02/08

 (6 件のコメント) (0 件のリアクション) (0 人の担当者)C# (1,926 件のフォーク)batch import
a/webviewe/3 :clock3:help wantedp/iOS 🍎t/bug :bug:up-for-grabs

Repository metrics

Stars
 (5,644 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

Description

When we tap on a button with selected text on a webview, the keyboard closes and the text looses the selection.

It's working perfectly on Android but not on iOS.

This behavior doesn't happen by default on native iOS.

The native implementation is the following: alt text

Steps to Reproduce

  1. Create a content page with a webview with a content editable html page and a button
  2. Tap on the content editable element
  3. Write some text
  4. Select the text
  5. Tap on the button on the content page

Expected Behavior

The keyboard shouldn't close and the text shouldn't loose it's selection nor should the keyboard close.

Actual Behavior

The text looses selection and the keyboard closes.

Basic Information

  • Version with issue: 3.4.0.1008975

  • Last known good version: None, never worked well.

  • IDE: Visual Studio 2017,Visual Studio 2019 Preview

  • Platform Target Frameworks: iOS

    • iOS: 12.1
  • Nuget Packages:

    • Prism.Forms - Version 7.1.0.431
    • Prism.Unity.Forms - Version 7.1.0.431
    • Xamarin.Forms - Version 3.4.0.1008975
  • Affected Devices: iPhone SE, iOS Simulator

Screenshots

Working:

alt text

Not working

alt text

Reproduction Link

https://github.com/carlos-ferreira/bug-reports/tree/master/Xamarin/Webview

コントリビューターガイド