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

Cannot read properties of null (reading 'offsetTop') #565

Closed
chapov opened this issue Jun 7, 2024 · 1 comment
Closed

Cannot read properties of null (reading 'offsetTop') #565

chapov opened this issue Jun 7, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@chapov
Copy link

chapov commented Jun 7, 2024

描述这个Bug

version 4.16.6

paste the code into the editor (eg css)
Scroll while viewing.
an error appears

image

Cannot read properties of null (reading 'offsetTop')
TypeError: Cannot read properties of null (reading 'offsetTop')
    at getLineNumber (webpack-internal:///./node_modules/md-editor-v3/lib/es/MdEditor.mjs:1344:76)
    at cEleHandler (webpack-internal:///./node_modules/md-editor-v3/lib/es/MdEditor.mjs:1474:25)
    at eval (webpack-internal:///./node_modules/md-editor-v3/lib/es/MdEditor.mjs:1514:7)
    at r (webpack-internal:///./node_modules/@vavt/util/lib/es/index.mjs:95:41)

版本号

node: 18.00
md-editor-v3: 4.16.6
vue: 3.4.27

问题重现链接

import { MdEditor } from 'md-editor-v3';
import 'md-editor-v3/lib/style.css';
export default {
  data() {
    return {
      toolbars: ['bold', 'italic', 'underline', '-', 'quote', 'link', 'code', '-'],
      composeReplyText: '',
      ticket_id: this.$route.params.ticket_id,
    };
  },
  components: {
    MdEditor,
  },
};

<template>
    <MdEditor v-model="composeReplyText" />
</template>
@imzbf imzbf added the bug Something isn't working label Jun 8, 2024
imzbf added a commit that referenced this issue Jun 8, 2024
@imzbf
Copy link
Owner

imzbf commented Jun 8, 2024

Fixed in 4.16.7

@imzbf imzbf closed this as completed Jun 8, 2024
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

2 participants