Error when enableDoubleTapViewing equals false in pdf with keyboard losing focus.

In some of my forms, there are fields that will automatically lose keyboard focus when tapped. This only happens when enableDoubleTapZooming is set to false in the PDF viewer though.

See the video for video evidence. The field that loses focus here is "Special Notes" at the bottom. Other forms have this issue in other fields as well that are multiline, and some that are not.

At the end of the video you see the field getting focus. This is because I double tapped the field. After double tapping the field, the keyboard is able to get focus. Then anytime after that, the field only requires a single tap.

See code below for the minimal reproducible code. The pdf used is included in the zip. This was done on an iPad with iPadOS 17.

video: https://youtu.be/uuEBgFXFV1o

import 'package:flutter/material.dart';
import 'package:syncfusion_flutter_pdfviewer/pdfviewer.dart';

void main() {
runApp(
MaterialApp(
title: 'Title',
home: Scaffold(
body: SfPdfViewer.asset(
'assets/claim_questionnaire.pdf',
enableDoubleTapZooming: false,
),
),
),
);
}

Attachment: claim_questionnaire.pdf_84a690f1.zip

9 Replies 1 reply marked as answer

IP ImmanKumarP Palanikumar Syncfusion Team May 20, 2024 05:58 AM UTC

Hi Jeremy Isenburg,

We are able to replicate the issue that the multi-line textbox form field loses focus immediately after the soft keyboard rises.

Currently, we are validating this issue, and we will update further details on May 22, 2024.

Regards,
Imman Kumar P



JI Jeremy Isenburg replied to ImmanKumarP Palanikumar May 21, 2024 04:28 AM UTC

Thanks for the update.

Also note that I have observed this happening on non-multiline fields as well. But it doesn't always happen so I can't get a good reproduction. Maybe it is the same fix though.



IP ImmanKumarP Palanikumar Syncfusion Team May 22, 2024 02:50 PM UTC

Hi Jeremy Isenburg,

While checking for the root cause of this issue, we have found the issue is from the Flutter framework. And we have created an issue in the flutter repository.

Please find the issue link below. https://github.com/flutter/flutter/issues/148855

We will update further details once we receive any solution or suggestions for this issue.

Regards,

Imman Kumar P



JI Jeremy Isenburg July 12, 2024 10:26 PM UTC

Hello,

The issue was closed without a reply from you guys. Could you confirm this was fixed or not?

https://github.com/flutter/flutter/issues/148855#issuecomment-2131413223



IP ImmanKumarP Palanikumar Syncfusion Team July 15, 2024 02:45 PM UTC

Hi Jeremy Isenburg,

Sorry for the inconvenience caused.

The suggestions provided in the issue are not working for SfPdfViewer. Currently, we are validating this issue and will provide further details on July 17, 2024.

Regards,

Imman Kumar P



IP ImmanKumarP Palanikumar Syncfusion Team July 17, 2024 03:13 PM UTC

Hi Jeremy Isenburg,

We have confirmed that the "soft keyboard hides immediately when tapped on a multi-line text box form field" is a defect in our product and have logged a report for it. The fix for the same will be included in the July 30, 2024, weekly release.

Please use the feedback link to track the status of the bug,

https://www.syncfusion.com/feedback/59601/soft-keyboard-hides-immediately-when-tapped-on-a-multi-line-text-box-form-field

Disclaimer: “Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.”

Regards,

Imman Kumar P



IP ImmanKumarP Palanikumar Syncfusion Team July 30, 2024 11:44 AM UTC

Hi Jeremy,

We have resolved the issue "soft keyboard hides immediately when tapped on a multi-line text box form field", and the fix for the same is available in our latest weekly release.

 

Package link: syncfusion_flutter_pdfviewer 26.2.7

 

Root cause: We rely on the FocusNode.rect property to determine whether the tapped position is outside the TextFormField widget to unfocus the TextFormField widget. However, this property has an incorrect value for our use case. We have now calculated the global position of the TextFormField widget using the bounds property and the localToGlobal method.

 

We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.

 

Regards,
Imman Kumar P


Marked as answer

JI Jeremy Isenburg August 5, 2024 07:18 PM UTC

Thanks, this works now.



IP ImmanKumarP Palanikumar Syncfusion Team August 6, 2024 08:14 AM UTC

We are glad that the issue is resolved. We are marking this ticket as solved.


Loader.
Up arrow icon