We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dfd1789 commit a5b4b7bCopy full SHA for a5b4b7b
src/utils/utils.js
@@ -780,6 +780,15 @@ export function isBlock(node) {
780
if (tagName.startsWith('JW-') || tagName === 'T') {
781
return true;
782
}
783
+ if (tagName === 'BR') {
784
+ // A <br> is always inline but getComputedStyle(br).display mistakenly
785
+ // returns 'block' if its parent is display:flex (at least on Chrome and
786
+ // Firefox (Linux)). Browsers normally support setting a <br>'s display
787
+ // property to 'none' but any other change is not supported. Therefore
788
+ // it is safe to simply declare that a <br> is never supposed to be a
789
+ // block.
790
+ return false;
791
+ }
792
// The node might not be in the DOM, in which case it has no CSS values.
793
if (window.document !== node.ownerDocument) {
794
return blockTagNames.includes(tagName);
0 commit comments