Skip to content
This repository was archived by the owner on Oct 20, 2019. It is now read-only.

非IE浏览器粘贴word内容提示错误 #6

@Bohsu

Description

@Bohsu

麻烦能看看非IE浏览器粘贴word内容提示错误。
Uncaught TypeMismatchError: Failed to execute 'removeAttributeNode' on 'Element': The 1st argument provided is either null, or an invalid Attr object.

导致错误的原因就是3048行 node.getAttributeNode('style') 返回null,然后传入了 removeAttributeNode 里。解决的方法是加入node.getAttributeNode('style') 为 null 的判断,如上代码所示。

  //if(node.getAttributeNode('style') != null){ //加上这句  
     //3048 !browser.ie && node.removeAttributeNode(node.getAttributeNode('style'))  
  //}  

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