Opened 12 years ago

Closed 10 years ago

#8647 closed Bug (fixed)

Placeholder plugin bug

Reported by: dgaspar Owned by:
Priority: Normal Milestone:
Component: General Version: 3.5
Keywords: Mac Cc:


In the placeholder demo:

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:

	[[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;

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.

	This is <strong>a [[sa</strong>mple <strong>placeholder]]. You</strong> are using <a href="">CKEditor</a>.</p>

Change History (3)

comment:1 Changed 12 years ago by Jakub Ś

Keywords: Mac added; placeholder removed
Status: newconfirmed
Version: 3.6.3 (SVN - trunk)3.5

comment:2 Changed 12 years ago by Jakub Ś

It seems that second TC can be reproduced ont only in Mac but also in Windows under Opera 11.50, Chrome 16, Safari 5.1.2 and Firefox9

The first TC is only reproducible on Mac

comment:3 Changed 10 years ago by Piotrek Koszuliński

Resolution: fixed
Status: confirmedclosed

Fixed in CKEditor 4.3. Partial placeholder selection is not possible any more.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy