Skip to content

With Grammar and Spelling checker by Ginger 2.0.189 Chrome extension, this.quill.on('text-change'...) emits the wrong dom. #486

@yanggs07

Description

@yanggs07

Describe the bug

the code in edit.vue is:

this.quill.on('text-change', (delta, oldDelta, source) => {
            let html = this.$refs.editor.children[0].innerHTML
            const quill = this.quill
            const text = this.quill.getText()
            if (html === '<p><br></p>') html = ''
            this._content = html
            this.$emit('input', this._content)
            this.$emit('change', { html, text, quill })
          })

Some how, the first dom of the editor sometimes is not quill editor.
screenshot-20230225-132548

, which would causes the wrong html dom emit to the procesor

Reproduction

1 use vue-quill-editor
2 enable chrome://extensions/?id=kdfieneakcjfaiglcfcgkidlkmlijjnh extension
3 when on change emits, the dom is wrong

System Info

[root@VM-0-12-centos yitang-fe]# npx envinfo --system --npmPackages --binaries --browsers
npx: 1 安装成功,用时 5.332 秒

  System:
    OS: Linux 5.4 TencentOS Server 3.1 (Final)
    CPU: (8) x64 AMD EPYC 7K62 48-Core Processor
    Memory: 5.00 GB / 15.38 GB
    Container: Yes
    Shell: 4.4.20 - /bin/bash
  Binaries:
    Node: 14.17.6 - /usr/local/bin/node
    Yarn: 1.22.11 - /usr/local/bin/yarn
    npm: 6.14.15 - /usr/local/bin/npm
  npmPackages:
    @babel/core: ^7.6.0 => 7.20.7
    @babel/plugin-transform-runtime: ^7.6.0 => 7.19.6
    @babel/preset-env: ^7.6.0 => 7.20.2
    @babel/runtime-corejs3: ^7.6.0 => 7.20.7
    @wangeditor/editor: ^5.1.10 => 5.1.23
    @wangeditor/editor-for-vue: ^1.0.2 => 1.0.2
    autoprefixer: ^9.3.1 => 9.8.8
    babel-loader: ^8.0.6 => 8.3.0
    babel-plugin-import: ^1.13.3 => 1.13.5
    babel-plugin-lodash: ^3.3.4 => 3.3.4
    bekit: ^0.1.5 => 0.1.5
    clipboard: ^2.0.4 => 2.0.11
    colors: ^1.3.2 => 1.4.0
    core-js: ^3.25.5 => 3.27.1
    crypto-js: ^3.1.9-1 => 3.3.0
    css-loader: ^1.0.1 => 1.0.1
    debounce: ^1.2.0 => 1.2.1
    easy-table: ^1.1.1 => 1.2.0
    element-ui: ^2.15.9 => 2.15.12
    eruda: ^1.5.4 => 1.10.3
    ether-aplyr: 0.0.4 => 0.0.4
    ether-report-logger: ^1.0.2 => 1.0.2
    ether-vway: ^0.5.0-alpha.10 => 0.5.0-alpha.10
    file-loader: ^6.2.0 => 6.2.0
    graceful-fs: ^3.0.12 => 3.0.12
    gulp: ^4.0.0 => 4.0.2
    gulp-replace: ^1.0.0 => 1.1.4
    html2canvas: ^1.0.0-rc.4 => 1.4.1
    ledap: ^0.1.10 => 0.1.10
    less: ^3.8.1 => 3.13.1
    less-loader: ^4.1.0 => 4.1.0
    lodash: ^4.17.15 => 4.17.21
    lodash-webpack-plugin: ^0.11.5 => 0.11.6
    moment: ^2.22.2 => 2.29.4
    postcss-loader: ^3.0.0 => 3.0.0
    postcss-px-to-viewport: 0.0.3 => 0.0.3
    postcss-pxtorem: ^5.1.1 => 5.1.1
    postcss-write-svg: ^3.0.1 => 3.0.1
    precss: ^3.1.2 => 3.1.2
    style-vw-loader: ^1.0.1 => 1.0.2
    swiper: ^3.4.2 => 3.4.2
    url-loader: ^4.1.1 => 4.1.1
    vant: ^2.12.30 => 2.12.53
    vue: ^2.6.10 => 2.7.14
    vue-awesome-swiper: ^3.1.3 => 3.1.3
    vue-fullpage: ^2.0.5 => 2.0.5
    vue-fullpage.js: ^0.1.7 => 0.1.7
    vue-lazyload: ^1.3.1 => 1.3.4
    vue-loader: ^15.4.2 => 15.10.1
    vue-quill-editor: ^3.0.6 => 3.0.6
    vue-router: ^3.0.6 => 3.6.5
    vue-style-loader: ^4.1.2 => 4.1.3
    vue-template-compiler: ^2.6.10 => 2.7.14
    vue-tiny-audio: ^0.1.3 => 0.1.3
    vue-touch: ^2.0.0-beta.4 => 2.0.0-beta.4
    webpack: ^4.23.1 => 4.46.0
    webpack-merge: ^4.1.4 => 4.2.2
    weixin-js-sdk: ^1.6.0 => 1.6.0

Used Package Manager

yarn

Validations

  • Read the the documentation in detail.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
  • The provided reproduction is a minimal reproducible example of the bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions