Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to beforeInput #7462

Closed
5 of 13 tasks
Reinmar opened this issue Jun 19, 2020 · 8 comments
Closed
5 of 13 tasks

Migrate to beforeInput #7462

Reinmar opened this issue Jun 19, 2020 · 8 comments
Assignees
Labels
domain:typing/ime This issue reports a problem with standard typing & IME (typing method for CJK languages). domain:ui/ux This issue reports a problem related to UI or UX. Epic resolution:duplicate This issue is a duplicate of another issue and was merged into it. squad:core Issue to be handled by the Core team. support:2 An issue reported by a commercially licensed client. type:improvement This issue reports a possible enhancement of an existing feature.

Comments

@Reinmar
Copy link
Member

Reinmar commented Jun 19, 2020

📝 Provide a description of the improvement

AFAICT https://bugzilla.mozilla.org/show_bug.cgi?id=970802 and https://bugzilla.mozilla.org/show_bug.cgi?id=1449831 landed in Firefox 76. That means that we can replace the current mutation-based typing handling with beforeInput 🎉.

It'd probably be good to keep the mutation handler for environments that do not support beforeInput yet, even if we don't officially support them (probably older versions of FF or Safari). On all environments that support beforeInput we should use it, though.

The goal is to use beforeInput to handle:

  • typing (all types of it, including IME and autocorrect)
  • spellchecking
  • enter
  • delete

As next steps we can also consider using it as an additional trigger for:

  • inline formatting: bold, italic, etc.,
  • and perhaps more

Some additional issues that might get fixed with it:



If you'd like to see this improvement implemented, add a 👍 reaction to this post.

@Reinmar Reinmar added type:improvement This issue reports a possible enhancement of an existing feature. domain:ui/ux This issue reports a problem related to UI or UX. squad:red labels Jun 19, 2020
@Reinmar Reinmar added this to the next milestone Jun 19, 2020
@lslowikowska lslowikowska added the support:2 An issue reported by a commercially licensed client. label Jul 15, 2020
@Reinmar Reinmar modified the milestones: next, iteration 35 Jul 31, 2020
@Reinmar Reinmar modified the milestones: iteration 35, iteration 36 Aug 24, 2020
@oleq oleq added squad:dx and removed squad:dx labels Sep 3, 2020
@oleq
Copy link
Member

oleq commented Sep 3, 2020

Order of things:

  1. In the beginning, we're merging into a feature branch (i/7462-beforeinput-wip).
  2. Then we merge the feature branch to master but the feature is disabled by default (see Implement the beforeInput support detection #7995).
  3. Then we merge issues to master.
  4. Then we pray.

@oleq
Copy link
Member

oleq commented Oct 7, 2021

FYI: Firefox supports beforeinput since v87 (Mar 2021). The current version is v93. This will dramatically simplify our codebase.

https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/87

https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/beforeinput_event#browser_compatibility

image

@Reinmar Reinmar added the domain:typing/ime This issue reports a problem with standard typing & IME (typing method for CJK languages). label Nov 4, 2021
@keng0o
Copy link

keng0o commented Dec 25, 2021

hi, any progress here?

@keng0o
Copy link

keng0o commented Jan 2, 2022

The same problem is occurring in Japanese.
What is the current situation?

@vdfor
Copy link

vdfor commented Mar 3, 2022

hi, any progress here?

@Reinmar
Copy link
Member Author

Reinmar commented Apr 13, 2022

There's been a lot of work put in this ticket in the past, but then we had to stop for about 1 year. 

The good news is that we restarted the work 🎉 . However, we continue in a new ticket to have a clearer picture of where we are because a lot of things happened in the meantime.

The new ticket is #11438 and I'm closing this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:typing/ime This issue reports a problem with standard typing & IME (typing method for CJK languages). domain:ui/ux This issue reports a problem related to UI or UX. Epic resolution:duplicate This issue is a duplicate of another issue and was merged into it. squad:core Issue to be handled by the Core team. support:2 An issue reported by a commercially licensed client. type:improvement This issue reports a possible enhancement of an existing feature.
Projects
None yet
Development

No branches or pull requests

9 participants