﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
16952	JS error when using div plugin next to a text node	Xavier Portebois		"== Steps to reproduce ==

1. use an instance with the `source` and `div` buttons, like the one in http://sdk.ckeditor.com/samples/fullpreset.html
2. click on `Source` and replace the full content with a simple div, like `<div>myText</div>`
3. place the cursor at the end of ''myText'' (or in between)
4. click on the `div` button in toolbar
5. click on the `OK` button in the dialog

== Expected result ==

1. the dialog closes
2. in the editor, a `div` is created

== Actual result ==

1. the dialog doesn't close
2. there is a javascript error: `currentNode.getParent(...) is null (div.js:147)`
3. in the editor, there is a new `<span style=""display:none"">&nbsp;</span>` where the cursor was

== Other details (browser, OS, CKEditor version, installed plugins) ==

As far as I understand the div plugin, there is a curious behavior with text nodes: the addon tries to find a common ancestor, and mixes up regular tags with a #text which doesn't have any ancestor, causing the null exception."	Bug	new	Normal		General	4.7.0		div	
