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

Mozilla Firefox text select problem #136

Open
seyitgokce opened this issue Jul 25, 2022 · 4 comments
Open

Mozilla Firefox text select problem #136

seyitgokce opened this issue Jul 25, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@seyitgokce
Copy link

seyitgokce commented Jul 25, 2022

Hi,

When i added a text block or i want edit a text block, i cant select text with mouse click at Firefox browser.
Not any problem at Chrome / IE browser.

Thanks

@m-Ryan
Copy link
Collaborator

m-Ryan commented Jul 26, 2022

#82

We used shadow dom to isolate styles, but the selection API is not widely supported. Maybe we will migrate shadow dom to iframe.
Related: WICG/webcomponents#79 (comment)

@renyuanz renyuanz added the bug Something isn't working label Jan 15, 2023
@applibs
Copy link

applibs commented May 30, 2023

When I open FF with debug console there is unsupported function for ShadowRoot API: getSelection.
See https://caniuse.com/mdn-api_shadowroot_getselection .
Can you fix it please at this line?
const range = (getShadowRoot() as any).getSelection().getRangeAt(0);

Is it possible use this polyfill? https://github.com/GoogleChromeLabs/shadow-selection-polyfill

@a-sokolova-dev
Copy link

When I open FF with debug console there is unsupported function for ShadowRoot API: getSelection. See https://caniuse.com/mdn-api_shadowroot_getselection . Can you fix it please at this line? const range = (getShadowRoot() as any).getSelection().getRangeAt(0);

Is it possible use this polyfill? https://github.com/GoogleChromeLabs/shadow-selection-polyfill

Hi @applibs!

I've had the same issue and I found that you can use this polyfill as a workaround. It's not complete, but it does solve the problem for Firefox and Safari.

Here's the link to the original discussion: GoogleChromeLabs/shadow-selection-polyfill#11

Hope this helps :)

@applibs
Copy link

applibs commented Jun 7, 2023

I am not participiant and I dont want be. Please fix it for others too. Thx.

Otherwise, Mozila has a whole other set of problems and it's basically unusable in FF.

  1. Double-click selection when text is formatted
  2. normal selection when text is formatted
  3. Select placeholder

Please change this line: backgroundColor: 'var(--color-bg-5);',
with: backgroundColor: 'var(--color-bg-5)',

FF does not like semicolon there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants