-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Description
Type of report
Bug
Provide detailed reproduction steps (if any)
- Create document containing at least one widget, and any block element at the document end, may be the widget, or another
- Try to use magic line to add paragraph below the last block element
Expected result
It is expected, when the mouse is moving below the last block element, that the magick line shows up and can be clicked.
Actual result
Moving mouse below the last block, the magic line diappears, making it unable to add new paragraph.
Analysis
The problem seems to be with the invisible element
<div data-cke-hidden-sel="1" data-cke-temp="1" style="position:fixed;top:0;left:-1000px;width:0;height:0;overflow:hidden;">Ovládací prvek div</div>
which is added to the very end of DOM of the wysiwyg, when a widget is focused.
In triggerEditable, where edge case is handled (bottom edge of the document), the following branch fails:
if ( !isHtml( edgeNode ) || isFlowBreaker( edgeNode ) || !isTrigger( that, edgeNode ) ) {
that.debug.logEnd( 'ABORT. Invalid edge node.' );
return null;
}
in particular the isFlowBreaker( edgeNode ) condition, because the said element is absolutely positioned.
In general, the plugin should be resistant against such rudimentary elements that are often appended to the end of document, and should ignore them.
Workaround
The user must click to the area at the end of document, to defocus the widget. When he moves the mouse again, the magic line appears, magic!
Other details
- Browser: Chrome
- OS: Windows
- CKEditor version: 4.20
- Installed CKEditor plugins: magicline