Open Bug 1916767 Opened 1 year ago Updated 3 months ago

Surrounding text doesn't work properly in Google Docs

Categories

(Web Compatibility :: Site Reports, defect, P3)

Firefox 130

Tracking

(Webcompat Priority:P3, Webcompat Score:1)

UNCONFIRMED
Webcompat Priority P3
Webcompat Score 1

People

(Reporter: eb1, Unassigned)

References

()

Details

(Keywords: stalled, webcompat:needs-diagnosis, webcompat:site-report, Whiteboard: [webcompat:sightline][webcompat:japan][webcompat:core])

User Story

platform:linux
impact:annoyance
configuration:general
affects:few
branch:release
diagnosis-team:dom
user-impact-score:3

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:130.0) Gecko/20100101 Firefox/130.0

Steps to reproduce:

sudo add-apt-repository ppa:keymanapp/keyman
sudo apt install keyman
km-package-install -p sil_ipa
  • Open Google Docs (https://docs.google.com/) and create a new document
  • switch to the "IPA (SIL)" keyboard
  • type <kbd>n</kbd><kbd>></kbd>

Actual results:

Actual resultː

Expected results:

Expected resultː ŋ

After pressing the "greater" key, Keyman will delete the previous character via delete_surrounding_text and then output ŋ.

This works correct in other apps (as long as they support surrounding text), and it works in Firefox except with Google Docs and Google Slides.

See also https://github.com/keymanapp/keyman/issues/12360.

Assuming this is a webcompat problem, since it works in other websites.

Component: Untriaged → Site Reports
Product: Firefox → Web Compatibility

eb1, just to confirm - does this work in Chrome, or is it broken there, too?

Severity: -- → S4
User Story: (updated)
Flags: needinfo?(eb1)
Priority: -- → P2
Priority: P2 → P3
Flags: needinfo?(james)

I tried to reproduce this, but Keyman didn't work at all on my system, so I'm hoping someone else will report on whether it also reproduces in Chrome :)

Flags: needinfo?(james)

Yes, it works correctly in Chrome (although Chrome doesn't support surrounding text, so Keyman has to use backspace to delete the previous character)

Flags: needinfo?(eb1)
Whiteboard: [webcompat:sightline]
Webcompat Priority: --- → P3
Webcompat Score: --- → 1

although Chrome doesn't support surrounding text, so Keyman has to use backspace to delete the previous character

Sounds like it's a broken feature but not "webcompat"? 👀

Whiteboard: [webcompat:sightline] → [webcompat:sightline][webcompat:japan]
User Story: (updated)

Comment #0 says:

This works correct in other apps (as long as they support surrounding text)

Comment #4 says:

Chrome doesn't support surrounding text, so Keyman has to use backspace to delete the previous character

So it's sorta broken on both browsers. Do we still need to track this as a webcompat issue?

User Story: (updated)
Flags: needinfo?(james)
Flags: needinfo?(dschubert)

Yes, IMO we still need to track this as a webcompat issue:

yes, Chrome doesn't support surrounding text, but it doesn't claim that it does, whereas Firefox says it supports surrounding text but it doesn't work.

I think tracking this as a (low-impact) webcompat issue is fine, since it seems to only affect Google docs, although I agree that the fact that it doesn't work in Chrome (or presumably other Linux browsers) means that it's a bit marginal. My guess is that the bug here might be on Google's side, based on the same thing working on other websites, so fixing it probably requires outreach, and our real choices from a bug tracking point of view are to track this as a webcompat issue or close the bug altogether, which doesn't seem better.

Flags: needinfo?(james)

track this as a webcompat issue or close the bug altogether

We have a third option - track this as a non-webcompat issue. But I guess it's fine as-is 👀

Flags: needinfo?(dschubert)

At least we know it's something to do with IME, so cc'ing Masayuki.

Keywords: stalled

Well, 2 possible scenarios.

If typing 2 characters quickly, the first character has not been reported as handled to the main process. Then, surrounding text has not been ready in the main process so that IME cannot access them. This is bug 1905481.

Otherwise, and I guess this is more possible than before. In my understanding, Google's apps use hidden <textarea> or <input> to handle text input. That may not have the first character already after applying the change to the content or may not realize that the surrounding text has already been removed without a Backspace key press. In this case, we might need to emulate Backspace key presses when deleting preceding text instead of eContentCommandDelete after eSetSelection. However, this is cancelable by web apps. So, this is worse implementation than current one. So, we should do this only when this approach is required.

Whiteboard: [webcompat:sightline][webcompat:japan] → [webcompat:sightline][webcompat:japan][webcompat:core]
You need to log in before you can comment on or make changes to this bug.