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

Text replacements / expansions doesn't work on MacOS #15535

Closed
Magistern opened this issue Nov 2, 2018 · 8 comments · Fixed by #32024
Closed

Text replacements / expansions doesn't work on MacOS #15535

Magistern opened this issue Nov 2, 2018 · 8 comments · Fixed by #32024

Comments

@Magistern
Copy link

@Magistern Magistern commented Nov 2, 2018

on iOS and macOS there is a feature called Text replacements. If I type :) it could be replaced with 😊, or if I typen@ it could expand to name@domain.com. It works in all applications, native or otherwise except Chrome and Electron apps (except Typora actually where it does work).

Would it be possible to bypass what seems to be a chromium "bug" and still make it possible in Electron? I believe the native property is automaticTextReplacementEnabled on the NSTextView class.
screenflow

@welcome
Copy link

@welcome welcome bot commented Nov 2, 2018

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

To help make it easier for us to investigate your issue, please follow the contributing guidelines.

@MarshallOfSound
Copy link
Member

@MarshallOfSound MarshallOfSound commented Nov 2, 2018

@socksy
Copy link

@socksy socksy commented May 13, 2019

@MarshallOfSound what's the reasoning behind that? (Other than FOSS developer scratching their itch in user land).

Surely a field on a NSTextView is preferable to a library that is reinventing the system by looking into the system preferences, finding the list of substitutions, and doing the substitution in JS?

Is it because of the underlying complexity of Chromium?

@MarshallOfSound
Copy link
Member

@MarshallOfSound MarshallOfSound commented May 15, 2019

@socksy Chromium doesn't use NSTextViews for it's text input. This is a longstanding issue in Chromium which I've heard recently is going to get some traction but we're entirely dependent on this implementation.

https://bugs.chromium.org/p/chromium/issues/detail?id=42434

@socksy
Copy link

@socksy socksy commented May 22, 2019

Thanks for the clarification!

@javan
Copy link
Contributor

@javan javan commented Jun 18, 2020

Chrome now has support for native text substitutions. Not sure if it was a Chrome or Chromium change, but maybe it's something Electron could pull in?

Screen Shot 2020-06-18 at 11 07 56 AM

@javan
Copy link
Contributor

@javan javan commented Mar 11, 2021

This is a longstanding issue in Chromium which I've heard recently is going to get some traction but we're entirely dependent on this implementation.

https://bugs.chromium.org/p/chromium/issues/detail?id=42434

@MarshallOfSound, it looks like that ^ issue has been resolved and Chromium seems to support text substitutions on macOS now (see my comment above). Could this issue be re-opened as a feature request? Or, would you like me to open a new one?

@mitchchn
Copy link
Contributor

@mitchchn mitchchn commented Oct 30, 2021

Would also like to see this added as a menu role, it seems the support is there in Chromium (and the substitutions do work even though the menu isn't present).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

6 participants