Opened 14 years ago

Closed 10 years ago

#5549 closed Bug (fixed)

Paste command scrolls document in Webkit

Reported by: Shane Birley Owned by:
Priority: Normal Milestone:
Component: Core : Pasting Version: 3.5
Keywords: WebKit Cc: saneilnaik11@…

Description

If you do a paste command in a document the editing window scrolls all the way to the end of the document. A problem for large documents.

It seems to be identical to this issue: http://dev.fckeditor.net/ticket/4910

Attachments (2)

5549.patch (2.5 KB) - added by Garry Yao 12 years ago.
article html.txt (5.5 KB) - added by Jakub Ś 12 years ago.

Download all attachments as: .zip

Change History (27)

comment:1 Changed 14 years ago by Shane Birley

Keywords: paste scroll chrome added

comment:2 Changed 14 years ago by Shane Birley

If you select "source" from the editor window and do a paste, the scroll does not happen. Just in case this helps.

comment:3 Changed 14 years ago by Garry Yao

Keywords: Pending Chrome added; paste scroll chrome removed

WFM in Chrome, could you please attach one sample page for reproducing?

comment:4 Changed 14 years ago by Shane Birley

I am going to test this a bit more. I have been playing with the configuration and I am not convinced it is CKEditor. There are two other issues on the site that may be playing into this problem.

I will update later today.

comment:5 Changed 13 years ago by Pieter Fibbe

I'm having the same issue here with the ckeditor in Chrome. It only happens when you paste single-line (so not with multiple-line text fragments) text after you set the data in the editor by invoking the editor.setData() command.

To reproduce:

var e = CKEDITOR.instances.editor1;
e.setData('foo<br/>bar<br/>foo<br/>bar<br/>foo<br/>bar<br/>foo<br/>bar<br/>foo<br/>bar<br/>foo<br/>bar<br/>foo<br/>bar<br/>foo<br/>bar<br/>foo<br/>bar<br/>foo<br/>bar<br/>foo<br/>bar<br/>foo<br/>bar<br/>foo<br/>bar<br/>foo<br/>bar<br/>foo<br/>bar<br/>foo<br/>bar<br/>foo<br/>bar<br/>foo<br/>bar<br/>');
  • paste (with CTRL-V or the paste icons in the editor) a word or a single line text anywhere in the editor. The editor will now scroll down.

comment:6 Changed 13 years ago by Paul Veldema

The problem seems to no longer occur in ckeditor 3.6.1.

Tested with Chrome 12.0.742.100

comment:7 in reply to:  6 Changed 13 years ago by Paul Veldema

Replying to pauljvrw:

The problem seems to no longer occur in ckeditor 3.6.1.

Tested with Chrome 12.0.742.100

I spoke a little too soon.

On Chrome under windows XP there is no problem as I mentioned above.

However if you test on a Win7 installation (I tested with the same Chrome version) you do see this effect.

comment:8 Changed 13 years ago by ComputecWebDev

Version: 3.2.13.6.1

Problem still exists in CKEditor 3.6.1. but ONLY if config.enterMode is CKEDITOR.ENTER_BR or you are inserting <br>'s manually like pfibbe in comment #5 and are pasting inside the "<br/>-area" (ckeditor demo uses default enterMode CKEDITOR.ENTER_P). Hope this gives a helpful hint how to fix this.

I can reproduce it with Windows XP and Windows 7, with Chrome 13.0.782.218 m (current final) and 14.0.835.122 beta-m (current beta).

I can confirm that this Chrome bug exists for quite a while now, at least with Chrome 12 and also with older versions of CKEditor, as our CMS uses CKEDITOR.ENTER_BR from the beginning, which goes back to FKEditor 2.x.

Version 0, edited 13 years ago by ComputecWebDev (next)

comment:9 Changed 13 years ago by Jakub Ś

Keywords: Webkit added; Chrome removed
Status: pendingconfirmed
Version: 3.6.13.5
  1. I have set enter mode to BR,
  2. Started editor with this data:
    var e = CKEDITOR.replace( 'editor1' );
    setTimeout(function(){	
    e.setData('foo<br/>bar<br/>foo<br/>bar<br/>foo<br/>bar<br/>foo<br/>bar<br/>foo<br/>bar<br/>foo<br/>bar<br/>foo<br/>bar<br/>foo<br/>bar<br/>foo<br/>bar<br/>foo<br/>bar<br/>foo<br/>bar<br/>foo<br/>bar<br/>foo<br/>bar<br/>foo<br/>bar<br/>foo<br/>bar<br/>foo<br/>bar<br/>foo<br/>bar<br/>foo<br/>bar<br/>');
    },1500);
    
  3. Pasted single word (copied from notepad) using CRTL+V

Editor has been scrolling down in Webkit browsers from CKEditor 3.5

comment:10 Changed 12 years ago by Garry Yao

Keywords: HasPatch added

This's a regression of [6143], it reveals the following issues:

  1. The paste bin position (which aligns to the selection start element) is causing of document scroll in first place.
  2. As webkit's not auto scrolling on execCommand('insertHtml'), so it's the scrollbar remains what been introduced in 1.
  3. The final fix for the scrolling position still dont get it correct as it's also using the selection's start element which is the body element in this case :)

I'm providing a patch here for v3 while the real fix will only land on v4's pasting system instead.

Changed 12 years ago by Garry Yao

Attachment: 5549.patch added

comment:11 Changed 12 years ago by Jakub Ś

Summary: Paste command scrolls document in Google ChromePaste command scrolls document in Webkit

Another issue for scrolling in Webkit was reported here: #8747

Last edited 12 years ago by Jakub Ś (previous) (diff)

comment:12 Changed 12 years ago by Frederico Caldeira Knabben

Keywords: WebKit added; Webkit removed

#8747 has been marked as DUP.

comment:13 Changed 12 years ago by Jakub Ś

Keywords: HasPatch removed

I have tried to apply patch on current trunk - it seems that it is out of date.

New TC from ticket #8824:

  1. Paste the contents from article html.txt into source area
  2. Switch to source and select Romney went on the offensive, text is right under Mitt Romney picture
  3. Press CRTL+C, CRTL+V

Results: From CKEditor 3.5 editor scrolls down but From CKEditor 3.6.2 rev [7399] editor scrolls up and browser scrolls down

Changed 12 years ago by Jakub Ś

Attachment: article html.txt added

comment:14 Changed 12 years ago by sanil

Cc: saneilnaik11@… added

comment:15 Changed 12 years ago by Jakub Ś

#5934 was marked as duplicate.

comment:16 Changed 11 years ago by Paul Veldema

I think this is fixed.

I tested the test case from comment 9 and comment 13 on http://nightly.ckeditor.com/13-07-11-13-05/standard/samples/plugins/enterkey/enterkey.html with the latest Chrome (28.0.1500.71) on win7 and no longer see any paste jumping.

comment:17 Changed 11 years ago by Jakub Ś

Resolution: fixed
Status: confirmedclosed

I wasn't able to reproduce this problem as well in latest CKEDitor 4.1.2, nightly and latest master.

I'm closing it as fixed in v4.

comment:18 Changed 10 years ago by Yoke Lee

Hi,

I still can see this issue in 4.3.1. I'm using Chrome in Win7. On initial load load, there's no issue, once you submit the form the issue reoccurs.

To reproduce:

  1. load in form.
  2. submit the form.
  3. type something, copy and paste it right away. you should be able to see the effect.

Please advise. Thanks.

comment:19 Changed 10 years ago by Andy

I am seeing this problem consistently with Chrome 29.0.1547.65 on Mac OSX. When I paste short text the window autoscrolls. Rather disconcerting for users. I'm using CKEditor 4.3.1.

comment:20 Changed 10 years ago by Frederico Caldeira Knabben

Resolution: fixed
Status: closedreopened

More investigation needed.

comment:21 in reply to:  19 Changed 10 years ago by Piotrek Koszuliński

Replying to arudmik:

I am seeing this problem consistently with Chrome 29.0.1547.65 on Mac OSX. When I paste short text the window autoscrolls. Rather disconcerting for users. I'm using CKEditor 4.3.1.

Are you using the divarea plugin? I cannot reproduce the issue without it. And there's a ticket for it - #9898.

Replying to NineAllexis:

I still can see this issue in 4.3.1. I'm using Chrome in Win7. On initial load load, there's no issue, once you submit the form the issue reoccurs.

I don't understand the TC described by you. Submitting form means sending it, so how could anything scroll then?

comment:22 Changed 10 years ago by Jakub Ś

Status: reopenedpending

comment:23 Changed 10 years ago by Yoke Lee

Hello

In my case, I validated my submitted form with server-side script (PHP). My form contains other elements than textarea, but not files. If validation failed, aka there's invalid input, the form will be reloaded, pre-filled with inputted values and error message is shown on respective field. This is when the symptom occur.

I'm using CodeIgniter framework.

Hope this clarifies my case.

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

It clarifies what you meant, but it doesn't help to reproduce it at all, because the behaviour is strongly related to the your system. To be able to verify an issue and work on it we need to see it, so in such case only a sample which you can attach can help.

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

Resolution: fixed
Status: pendingclosed

I'm closing as "fixed" again.

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