Open Bug 2048921 Opened 5 months ago Updated 4 months ago

Keyboard entry not working when pop-up first displayed

Categories

(GeckoView :: IME, defect)

Firefox 152
All
Android
defect

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: moz, Unassigned)

References

Details

Steps to reproduce:

When a pop-up is opened (via window.open), the input/text and textarea components will not accept keyboard entry until the window is refreshed (by swiping down to reload). It used to work as expected prior to (around) Firefox 148. This ONLY affects Firefox on Android - Firefox on desktop (Windows/Linux/MacOS) and iOS/iPadOS work fine. This issue isn't present on Google Chrome on Android nor the Silk browser on a Kindle Fire.

I have tested this Firefox issue on three Android devices: two smartphones and a Kindle Fire - all three devices exhibit the same issue.

This simple test script illustrates the issue (note that there is no submit button on the form, as that is irrelevant to the issue):

<!DOCTYPE html>
<html lang="en-GB">
<head>
<title>Form Test</title>
<meta charset="utf-8" />
<meta name="viewport" content="height = device-height, width = device-width, initial-scale = 1.0, user-scalable = yes" />

</head>
<body>

<h1>Form Test</h1>

<form name="f1" id="f1" method="post" action="/">
Text Input: <input type="text" id="t1" name="t1" value="" size="30" />

<br/><br/>Text Area: <textarea id="t2" name="t2" cols="30" rows="8" ></textarea>

</form>

<br/><br/>
<input type="button" value="Popup" onclick="window.open ('/fftest.htm', 'Form Test', 'toolbar=no,menubar=no,scrollbars=yes,width=500,height=600,resizable=yes,status=yes')" />
<br/><br/><input type="button" value="Back" onclick="window.close()" />
</body>
</html>

The above script can also be run directly at:
https://www.vivadjinn.com/fftest.htm

Actual results:

Run the above test script as a normal HTML page, and the text fields in the form will accept keyboard entry as expected. Click the "Popup" button included as part of the test script to load the same page as a pop-up window via a JavaScript window.open call. On Firefox Android only, the text fields will not accept keyboard input at this point. Refreshing the page by swiping down will then allow normal keyboard entry.

Expected results:

Keyboard entry should not have required the page to be refreshed.

The Bugbug bot thinks this bug should belong to the 'Firefox for Android::Browser Engine' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: General → Browser Engine
Severity: -- → S3
Component: Browser Engine → IME
Product: Firefox for Android → GeckoView

When creating new GeckoSession then loading a URI at first time, there is no focused editable. We do nothing for this situation, so we should dismiss soft input with delayed time. If content has new focus soon, this task will be cancelled.

See Also: → 2057393

Original issue is 2 issues

  • Bug 2057393 since EditableChild isn't attached
  • When calling TextInputDelegate.hideSoftInput, view is nothing since GeckoSession is attached on GeckoView is changed.

When detaching GeckoSession, I should dismiss virtual keyboard immediately if we have a hidden task (HideSoftInputTask).

You need to log in before you can comment on or make changes to this bug.