Closed Bug 1872863 Opened 5 months ago Closed 3 months ago

Keyboard does not open for an OneDrive Excel table

Categories

(GeckoView :: IME, defect)

Firefox 121
All
Android
defect

Tracking

(firefox122 wontfix, firefox123 wontfix, firefox124 wontfix, firefox125 fixed)

RESOLVED FIXED
125 Branch
Tracking Status
firefox122 --- wontfix
firefox123 --- wontfix
firefox124 --- wontfix
firefox125 --- fixed

People

(Reporter: hypopheralcus-firefox, Assigned: m_kato)

References

(Regression)

Details

(Keywords: regression, Whiteboard: [qa-triaged])

Attachments

(3 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:121.0) Gecko/20100101 Firefox/121.0

Steps to reproduce:

I opened a Microsoft OneDrive Excel table in Firefox and tried to edit a cell.

There are two ways to reproduce the issue:

  1. I double-clicked on a cell.
  2. I long-clicked on a cell and a context menu with "Edit" appeared. Then I clicked on "Edit".

Here is the OneDrive Excel table I used for the test:
https://onedrive.live.com/edit?id=FF5BBCE839DDDDFF!108&resid=FF5BBCE839DDDDFF!108&ithint=file%2cxlsx&authkey=!AF4W8-6OX8O-XE8&wdo=2&cid=ff5bbce839ddddff

I could reproduce the issue with:

Firefox 121.0 (Build #2015991663)
Firefox Nightly 123.0a1 (Build #2015995367)
Xiaomi Redmi Note 11 Pro 5G
Android 13 TKQ1.221114.001

Firefox 120.1.1 (Build #2015990546)
WIKO Y80
Android 9

Actual results:

In both cases the keyboard did not open.

Expected results:

The keyboard should open and allow editing the cell, like it does on Google Chrome (Android).

Component: General → IME
Product: Fenix → GeckoView

The severity field is not set for this bug.
:m_kato, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(m_kato)

Thank you for your report! I was able to reproduce this issue on the latest Nghtly 123.0a1 from 22.01.2024 with Motorola G9 plus (Android 11).

Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true
Whiteboard: [qa-triaged]
Flags: needinfo?(m_kato)

Hmm, interesting. When using RDM mode on Firefox desktop (macOS), IME isn't turned on.
When using Android version with external Keyboard, IME isn't turned on too.

I guess that <textarea id="m_excelWebRenderer_ewaCtl_gridKeyboardInput"> element in <div id="gridKeyboardContentEditable"> doesn't use on Firefox/Android. gridKeyboardContentEditable has a lot of event listeners for key, IME, focus, touch and etc, so hardware keyboard (without IME) will work.

02-01 22:41:54.997  3821  3836 I Gecko   : [Child 3821: Main Thread]: D/IMEContentObserver 0x72a6dc15cc10 BeginDocumentUpdate(), HasAddedNodesDuringDocumentChange()=false
02-01 22:41:54.997  3821  3836 I Gecko   : [Child 3821: Main Thread]: D/IMEContentObserver 0x72a6dc15cc10 EndDocumentUpdate(), HasAddedNodesDuringDocumentChange()=false
02-01 22:41:54.997  3821  3836 I Gecko   : [Child 3821: Main Thread]: I/IMEStateManager MaybeOnEditableStateDisabled(aPresContext=0x72a6dea67000, aElement=0x72a6e4431ee0), sFocusedPresContext=0x72a6dea67000 (available: true), sFocusedElement=0x72a6e4431ee0, sTextInputHandlingWidget=0x72a6df32b000 (available: true), sActiveIMEContentObserver=0x72a6dc15cc10, sIsGettingNewIMEState=false
02-01 22:41:54.997  3821  3836 I Gecko   : [Child 3821: Main Thread]: I/IMEStateManager GetNewIMEState(aPresContext=0x72a6dea67000, aElement=0x72a6e4431ee0), sInstalledMenuKeyboardListener=false
02-01 22:41:54.998  3821  3836 I Gecko   : [Child 3821: Main Thread]: D/IMEStateManager   GetNewIMEState() returns { mEnabled=DISABLED, mOpen=DONT_CHANGE_OPEN_STATE }
02-01 22:41:54.998  3821  3836 I Gecko   : [Child 3821: Main Thread]: I/IMEStateManager DestroyIMEContentObserver(), destroying the active IMEContentObserver...
02-01 22:41:54.998  3821  3836 I Gecko   : [Child 3821: Main Thread]: I/IMEContentObserver 0x72a6dc15cc10 NotifyIMEOfBlur(), sending NOTIFY_IME_OF_BLUR
02-01 22:41:54.998  3821  3836 I Gecko   : [Child 3821: Main Thread]: I/IMEStateManager NotifyIME(aNotification={ mMessage=NOTIFY_IME_OF_BLUR }, aWidget=0x72a6df32b000, aBrowserParent=0x0), sFocusedIMEWidget=0x72a6df32b000, BrowserParent::GetFocused()=0x0, sFocusedIMEBrowserParent=0x0, aBrowserParent == BrowserParent::GetFocused()=true, aBrowserParent == sFocusedIMEBrowserParent=true, CanSendNotificationToWidget()=true
02-01 22:41:54.998  3821  3836 I Gecko   : [Child 3821: Main Thread]: D/IMEContentObserver 0x72a6dc15cc10   NotifyIMEOfBlur(), sent NOTIFY_IME_OF_BLUR
02-01 22:41:54.998  3821  3836 I Gecko   : [Child 3821: Main Thread]: I/IMEStateManager SetIMEState(aState={ mEnabled=DISABLED, mOpen=DONT_CHANGE_OPEN_STATE }, nsPresContext=0x72a6dea67000, aElement=0x72a6e4431ee0 (BrowserParent=0x0), aWidget=0x72a6df32b000, aAction={ mCause=CAUSE_UNKNOWN, mFocusChange=FOCUS_NOT_CHANGED }, aOrigin=ORIGIN_CONTENT)
02-01 22:41:54.998  3821  3836 I Gecko   : [Child 3821: Main Thread]: I/IMEStateManager SetInputContext(aWidget=0x72a6df32b000, aInputContext={ mIMEState={ mEnabled=DISABLED, mOpen=DONT_CHANGE_OPEN_STATE }, mOrigin=ORIGIN_CONTENT, mHTMLInputType="", mHTMLInputMode="", mActionHint="", mAutocapitalize="", mIsPrivateBrowsing=false }, aAction={ mCause=CAUSE_UNKNOWN_DURING_NON_KEYBOARD_INPUT, mAction=FOCUS_NOT_CHANGED }), BrowserParent::GetFocused()=0x0
02-01 22:41:54.998  3633  3649 I Gecko   : [Parent 3633: Main Thread]: I/IMEStateManager SetInputContextForChildProcess(aBrowserParent=0x72a6e10bae00, aInputContext={ mIMEState={ mEnabled=DISABLED, mOpen=DONT_CHANGE_OPEN_STATE }, mOrigin=ORIGIN_CONTENT, mHTMLInputType="", mHTMLInputMode="", mActionHint="", mAutocapitalize="", mIsPrivateBrowsing=false } , aAction={ mCause=CAUSE_UNKNOWN_DURING_NON_KEYBOARD_INPUT, mAction=FOCUS_NOT_CHANGED }), sFocusedPresContext=0x72a6e2d4e100 (available: true), sTextInputHandlingWidget=0x72a6e0808c00 (available: true), BrowserParent::GetFocused()=0x72a6e10bae00, sInstalledMenuKeyboardListener=false
02-01 22:41:54.998  3633  3649 I Gecko   : [Parent 3633: Main Thread]: I/IMEStateManager SetInputContext(aWidget=0x72a6e0808c00, aInputContext={ mIMEState={ mEnabled=DISABLED, mOpen=DONT_CHANGE_OPEN_STATE }, mOrigin=ORIGIN_CONTENT, mHTMLInputType="", mHTMLInputMode="", mActionHint="", mAutocapitalize="", mIsPrivateBrowsing=false }, aAction={ mCause=CAUSE_UNKNOWN_DURING_NON_KEYBOARD_INPUT, mAction=FOCUS_NOT_CHANGED }), BrowserParent::GetFocused()=0x72a6e10bae00

Desktop version doesn't change contenteditable attribute into focused element. But mobile version changes contenteditable attribute when losting focus.

Assignee: nobody → m_kato

I guess that this is regression by bug 1807495. IME focus isn;t set on this situation. Having SelectionAncestorLimiter?

Keywords: regression
Regressed by: 1807495

Set release status flags based on info from the regressing bug 1807495

Sounds like there is a case which we need to kick a pseudo focus change for IMEStateManager and HTMLEditor...

  • FocusedElementOrDocumentBecomesNotEditable will call HTMLEditor::OnBlur. But since we have focused element, we don't call EditorBase::FinalizeSelection. (If HTML has one contenteditable element only, FinalizeSelection will be called by tear down editor.).
  • IMEStateManager::OnFocusInEditor uses previous IMEState (sTextInputHandlingWidget->GetInputContext().mIMEState). Current (by contenteditable=true) state should get from parameter's aElement.
  • Geckoview doesn't have spell checker, we should ignore error by GetInlineSpellChecker in DeferredContentEditableCountChange.
Attached file testcase

Set release status flags based on info from the regressing bug 1807495

When focused element becomes editable by contentedtiable=true, IME
content observer isn't created on some situations. Then IME focus isn't
set.

At first, when focused element becomes non-editable,
FocusedElementOrDocumentBecomesNotEditable will destroy IME content
observer, but editor might not be destroyed completely since HTML content
has multiple contenteditable and has focus.

Then, when focused element becomes editable again,
FocusedElementOrDocumentBecomesEditable will check selection ancestor
limit, but since editor isn't destroyed by previous contenteditable
change, we already have this limit. Then we don't create IME content
observer.

So we should set current IME state and create IME content observer when
becoming editable.

Pushed by m_kato@ga2.so-net.ne.jp:
https://hg.mozilla.org/integration/autoland/rev/6a713f90fba6
Part 1. Ignore error of GetInlineSpellCheckek. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/945aa6c8a8ad
Part 2. IME focus should be updated when focused element becomes editable. r=masayuki
Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 125 Branch

I think this is risk to uplift this.

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

Attachment

General

Created:
Updated:
Size: