Opened 7 years ago

Closed 7 years ago

#5983 closed Bug (worksforme)

Chrome: Pasting repeatedly by holding ^V results in javascript error and extra <body> tags at the end of the document.

Reported by: Jude Allred Owned by:
Priority: Normal Milestone:
Component: Core : Pasting Version: 3.4
Keywords: Chrome Cc:

Description

Reproduced using ckeditor.com/demo

  1. Select some text, copy it.
  2. In wysiwyg mode, hold Ctrl-V

Expected results: repeated pastes of the text

actual: many <body id="cke_pastebin"></body> tags in source, plus javascript error:

Uncaught TypeError: Cannot call method 'getDocumentPosition' of null

What follows is the 'source' output generated via performing these repro steps on the 'little red riding hood' header.

<h1>
	<img alt="" src="http://a.cksource.com/c/1/inc/img/demo-little-red.jpg" style="margin-left: 10px; margin-right: 10px; float: left; width: 120px; height: 168px;" /></h1>
<h1>
	Little Red Riding HoodLittle Red Riding HoodLittle Red Riding HoodLittle Red Riding HoodLittle Red Riding Hood</h1>
<p>
	&quot;<b>Little Red Riding Hood</b>&quot; is a famous <a href="http://en.wikipedia.org/wiki/Fairy_tale" title="Fairy tale">fairy tale</a> about a young girl&#39;s encounter with a wolf. The story has been changed considerably in its history and subject to numerous modern adaptations and readings.</p>
<table align="right" border="1" cellpadding="1" cellspacing="1" style="width: 200px;">
	<caption>
		<strong>International Names</strong></caption>
	<tbody>
		<tr>
			<td>
				Chinese</td>
			<td>
				<i>小紅帽</i></td>
		</tr>
		<tr>
			<td>
				Italian</td>
			<td>
				<i>Cappuccetto Rosso</i></td>
		</tr>
		<tr>
			<td>
				Spanish</td>
			<td>
				<i>Caperucita Roja</i></td>
		</tr>
	</tbody>
</table>
<p>
	The version most widely known today is based on the <a href="http://en.wikipedia.org/wiki/Brothers_Grimm" title="Brothers Grimm">Brothers Grimm</a> variant. It is about a girl called Little Red Riding Hood, after the red <a href="http://en.wikipedia.org/wiki/Hood_%28headgear%29" title="Hood (headgear)">hooded</a> <a href="http://en.wikipedia.org/wiki/Cape" title="Cape">cape</a> or <a href="http://en.wikipedia.org/wiki/Cloak" title="Cloak">cloak</a> she wears. The girl walks through the woods to deliver food to her sick grandmother.</p>
<p>
	A wolf wants to eat the girl but is afraid to do so in public. He approaches the girl, and she na&iuml;vely tells him where she is going. He suggests the girl pick some flowers, which she does. In the meantime, he goes to the grandmother&#39;s house and gains entry by pretending to be the girl. He swallows the grandmother whole, and waits for the girl, disguised as the grandmother.</p>
<p>
	When the girl arrives, she notices he looks very strange to be her grandma. In most retellings, this eventually culminates with Little Red Riding Hood saying, &quot;My, what big teeth you have!&quot;<br />
	To which the wolf replies, &quot;The better to eat you with,&quot; and swallows her whole, too.</p>
<p>
	A <a href="http://en.wikipedia.org/wiki/Hunter" title="Hunter">hunter</a>, however, comes to the rescue and cuts the wolf open. Little Red Riding Hood and her grandmother emerge unharmed. They fill the wolf&#39;s body with heavy stones, which drown him when he falls into a well. Other versions of the story have had the grandmother shut in the closet instead of eaten, and some have Little Red Riding Hood saved by the hunter as the wolf advances on her rather than after she is eaten.</p>
<p>
	The tale makes the clearest contrast between the safe world of the village and the dangers of the <a href="http://en.wikipedia.org/wiki/Enchanted_forest" title="Enchanted forest">forest</a>, conventional antitheses that are essentially medieval, though no written versions are as old as that.</p>
<body id="cke_pastebin"></body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>
<body id="cke_pastebin">
	&nbsp;</body>

Change History (1)

comment:1 Changed 7 years ago by Krzysztof Studnik

Component: GeneralCore : Pasting
Keywords: Chrome added
Resolution: worksforme
Status: newclosed
Version: 3.4

Works For Me, Checked on Chrome 7, CKE 3.4.1 Demo.

Note: See TracTickets for help on using tickets.
© 2003 – 2017 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy