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

Checklist: unable to tick/untick check boxes on Chrome Mobile #2031

Closed
dmarcelino opened this issue Mar 21, 2018 · 6 comments
Closed

Checklist: unable to tick/untick check boxes on Chrome Mobile #2031

dmarcelino opened this issue Mar 21, 2018 · 6 comments

Comments

@dmarcelino
Copy link

dmarcelino commented Mar 21, 2018

Hi, this issue was originally detected and discussed at #759 (comment). When using Chrome Mobile and trying to tick or untick a check box, the box returns to the previous state.

Steps for Reproduction

  1. Visit https://codepen.io/anon/pen/JLdyQq on Chrome Mobile (or Chrome Desktop with inspect)
  2. Add a checklist with a few check boxes
  3. Tick / untick checkboxes

Expected behavior: For the checkbox to become ticked / unticked

Actual behavior: The checkbox returns to previous state

Platforms: Chrome Mobile

Version: v1.3.5

Investigation: This issue happens because both touchstart and mousedown are being fired, see list.js#L77-L78 and #759 (comment) for more details.

@volser
Copy link

volser commented May 18, 2018

I'm also experiencing issues of clicking checkboxes on android devices

@Triangel-ya
Copy link

if I want to change the text on the chrome moblie, I can not select the word, because I use e.preventDefault()

@schollz
Copy link

schollz commented Oct 15, 2019

I love this feature. I'm still experiencing this too, does anyone have workarounds?

@akhilaudable
Copy link

+1

@koenvg
Copy link

koenvg commented Oct 18, 2020

Hey, if anyone is looking for a workaround. This is how I solved it.

const List = Quill.import("formats/list");

class BetterList extends List {
  constructor(el: HTMLElement) {
    super(el);

    const isCheckList = el.hasAttribute("data-checked");
    el.addEventListener("touchstart", (e) => {
      if (!isCheckList) {
        return;
      }
      e.preventDefault();
    });
  }
}

Quill.register("formats/lists", BetterList);

@quill-bot
Copy link

Quill 2.0 has been released (announcement post) with many changes and fixes. If this is still an issue please create a new issue after reviewing our updated Contributing guide 🙏

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

Successfully merging a pull request may close this issue.

7 participants