mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 02:23:58 +00:00
EditCheck: Exclude nodes that aren't at the document root (i.e. image captions, table cells)
Bug: T340086 Change-Id: I8f5343f908efb3d39f20be97d132b146115910f9
This commit is contained in:
parent
68983da916
commit
fc41331470
|
@ -38,6 +38,11 @@ mw.editcheck.doesAddedContentNeedReference = function ( documentModel ) {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
// 3. Exclude any ranges that aren't at the document root (i.e. image captions, table cells)
|
||||
var branchNode = documentModel.getBranchNodeFromOffset( range.start );
|
||||
if ( branchNode.getParent() !== documentModel.attachedRoot ) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue