﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
8647	Placeholder plugin bug	dgaspar		"In the placeholder demo: http://nightly.ckeditor.com/7350/_samples/placeholder.html

Here's how to reproduce the bug (chrome mac):
- Fully erase the demo text
- add a placeholder, ex: MY_VARIABLE
- switch to source
- switch back to html
- select part of the placeholder with the mouse (ex: select ""IABLE]"")
- press ctl+'''b'''

The placeholder is now broken:
{{{
<p>
	[[MY_VAR<span id=""cke_bm_49S"" style=""display: none; "">&nbsp;</span><span style=""display: none; "">&nbsp;</span>IABLE]<span style=""display: none; "">&nbsp;</span><span id=""cke_bm_49E"" style=""display: none; "">&nbsp;</span>]</p>
}}}
And an error is triggered: _source/styles/plugin.js, line 465: ''Uncaught TypeError: Cannot call method 'getPosition' of null''
{{{
if (currentNode.getPosition( lastNode ) == CKEDITOR.POSITION_FOLLOWING )
			currentNode = 0;
}}}
It should probably be:
{{{
if ( currentNode && currentNode.getPosition( lastNode ) == CKEDITOR.POSITION_FOLLOWING )
			currentNode = 0;
}}}
[[BR]]
[[BR]]

Bonus: another bug when
- select the whole placeholder text
- ctrl+'''b'''
- now select just a part of the placeholder string (in '''bold''')
- ctrl+'''b''' again
The placeholder is now broken.
{{{
<p>
	This is <strong>a [[sa</strong>mple <strong>placeholder]]. You</strong> are using <a href=""http://ckeditor.com/"">CKEditor</a>.</p>
}}}"	Bug	closed	Normal		General	3.5	fixed	Mac	
