-
Notifications
You must be signed in to change notification settings - Fork 245
Do not insert BR in empty inline elements when parent node contains text #258
Conversation
@@ -16,6 +16,12 @@ define([ | |||
|
|||
// http://www.w3.org/TR/html-markup/syntax.html#syntax-elements | |||
var html5VoidElements = ['AREA', 'BASE', 'BR', 'COL', 'COMMAND', 'EMBED', 'HR', 'IMG', 'INPUT', 'KEYGEN', 'LINK', 'META', 'PARAM', 'SOURCE', 'TRACK', 'WBR']; | |||
var inlineElements = ['B', 'I']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it might be better if we'd use !isBlockElement
in scribe-common. That way we should cover all types of elements, and also custom elements (which are inline by default).
Scibe-common updated to use isCaretPositionNode. We also use !isBlockElement as suggested. |
@robinedman. Mind taking a look? On 2 October 2014 10:05, Alessandro Ludovici notifications@github.com
Visit theguardian.com. On your mobile and tablet, download the Guardian This e-mail and all attachments are confidential and may also be Guardian News & Media Limited is a member of Guardian Media Group plc. Registered |
Sure thing. I'll pull and have a play around with this one! :) |
Seems to be working fine (also for custom elements like |
Do not insert BR in empty inline elements when parent node contains text
This solves the bug shown in the gif...
and the fix....