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

Quill 1.3.x broke interactive embeds #1691

Closed
guillaumepotier opened this issue Sep 7, 2017 · 3 comments
Closed

Quill 1.3.x broke interactive embeds #1691

guillaumepotier opened this issue Sep 7, 2017 · 3 comments

Comments

@guillaumepotier
Copy link

Steps for Reproduction

  1. See how quill 1.2.6 handled embeds here : https://codepen.io/guillaumepotier/pen/WEqrBd
  2. See how quill 1.3.x handle embeds now : https://codepen.io/guillaumepotier/pen/gxNPma

Problem:

In my project, I mix text and rich contents in the editor/page, rendered and handled by React. See screenshot :
screen shot 2017-09-07 at 18 56 00
I want to be able to interact with them, for te task, edit it (this is a contenteditable div), for the embed below to select a provider then enter url, title, etc...

With 1.3.0

Fix cursor interaction with custom contenteditable=false embeds

As you can see in the two codepens, this is now impossible to interact with them, Quill puts cursor after the element, prevent having focus on input/textarea/contenteditable, opens bubble from theme...

I'm aware my usage might be very special and un-standard, but I chose Quill for my project just for this ability to make my editor much richer with specific contents for my app.

How could we possibly fix that behavior, while keeping the good work it produced for #1172 #1181 ?

I'd really like not to be jailed on 1.2.6 on Quill.. Or at least, help me narrow the commits changes to fork the repo and try to maintain myself Quill without this "feature" ?

Thanks a lot

Platforms:

Latest Chrome

@jhchen
Copy link
Member

jhchen commented Sep 11, 2017

The root seems to be the .ql-embed-selected feature which was based on the assumption that usually you want to select the thing you click on but this does not appear to be true in a lot of cases (like this) so I think I might just remove this feature.

@guillaumepotier
Copy link
Author

Hi @jhchen, thanks for your answer!

Glad to read that this behaviour is not as uncommon as I may though :)

Two comments on that :

  • This reverted feature might be good for some usages no? Might it be something you want to keep and configurable through options?
  • More generally, won't it be possible to think about a way to "modularize" selection or at least some behaviours of it? I did not dig enough in the code but it seems that this.selection = new Selection(this.scroll, this.emitter); in Quill constructor might be limiting. Might be possible to give it to constructor in options, and kept that way if none given?

Thanks again a lot for your work. And btw if you're interested by a glance on our product built around Quill, tell me I'd be glad to give you a private beta access by email.

Best

@jhchen
Copy link
Member

jhchen commented Sep 21, 2017

It was a bit experimental in the first place and it introduced more issues than it is worth. I may re-introduce it in the future if it's use is more clear to avoid ongoing maintenance cost and complexity if it is not.

I'm always happy to see Quill used in real products feel free to send an email jhchen7@gmail.com

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

No branches or pull requests

2 participants