Opened 15 years ago
Closed 11 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)
Change History (27)
comment:1 Changed 15 years ago by
Keywords: | paste scroll chrome added |
---|
comment:2 Changed 15 years ago by
comment:3 Changed 15 years ago by
Keywords: | Pending Chrome added; paste scroll chrome removed |
---|
WFM in Chrome, could you please attach one sample page for reproducing?
comment:4 Changed 15 years ago by
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 14 years ago by
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:
- start the demo (http://ckeditor.com/demo)
- in the Chrome console type the following:
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 follow-up: 7 Changed 14 years ago by
The problem seems to no longer occur in ckeditor 3.6.1.
Tested with Chrome 12.0.742.100
comment:7 Changed 14 years ago by
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
Version: | 3.2.1 → 3.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 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 FCKEditor 2.x.
comment:9 Changed 13 years ago by
Keywords: | Webkit added; Chrome removed |
---|---|
Status: | pending → confirmed |
Version: | 3.6.1 → 3.5 |
- I have set enter mode to BR,
- 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);
- Pasted single word (copied from notepad) using CRTL+V
Editor has been scrolling down in Webkit browsers from CKEditor 3.5
comment:10 Changed 13 years ago by
Keywords: | HasPatch added |
---|
This's a regression of [6143], it reveals the following issues:
- The paste bin position (which aligns to the selection start element) is causing of document scroll in first place.
- As webkit's not auto scrolling on execCommand('insertHtml'), so it's the scrollbar remains what been introduced in 1.
- 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 13 years ago by
Attachment: | 5549.patch added |
---|
comment:11 Changed 13 years ago by
Summary: | Paste command scrolls document in Google Chrome → Paste command scrolls document in Webkit |
---|
Another issue for scrolling in Webkit was reported here: #8747
comment:12 Changed 13 years ago by
Keywords: | WebKit added; Webkit removed |
---|
#8747 has been marked as DUP.
comment:13 Changed 13 years ago by
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:
- Paste the contents from article html.txt into source area
- Switch to source and select
Romney went on the offensive
, text is right under Mitt Romney picture - 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 13 years ago by
Attachment: | article html.txt added |
---|
comment:14 Changed 13 years ago by
Cc: | saneilnaik11@… added |
---|
comment:16 Changed 12 years ago by
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 12 years ago by
Resolution: | → fixed |
---|---|
Status: | confirmed → closed |
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 11 years ago by
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:
- load in form.
- submit the form.
- type something, copy and paste it right away. you should be able to see the effect.
Please advise. Thanks.
comment:19 follow-up: 21 Changed 11 years ago by
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 11 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
More investigation needed.
comment:21 Changed 11 years ago by
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 11 years ago by
Status: | reopened → pending |
---|
comment:23 Changed 11 years ago by
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 11 years ago by
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 11 years ago by
Resolution: | → fixed |
---|---|
Status: | pending → closed |
I'm closing as "fixed" again.
If you select "source" from the editor window and do a paste, the scroll does not happen. Just in case this helps.