Opened 9 years ago

Last modified 8 years ago

#7080 confirmed Bug

clear selection cause window scroll

Reported by: yiminghe Owned by:
Priority: Normal Milestone:
Component: Core : Selection Version: 3.2.1
Keywords: IE6 IE7 Cc:

Description

happen in ie6

steps: 1.place a button far below editor :

<textarea id='test'></textarea>
<div style='height:1500px;'></div>
<button>click</button>
<script>CKEDITOR.replace("test");</script>

2.insert a page-break('插入分页符') into editor

3.keep focus(cursor) in the editor and scroll to 'click button' using mouse wheel

4.click button

expected :

window does not scroll

actual :

window scrolls to editor

reason :

caused by line 184 in _source/plugins/selection/plugin.js

doc.selection.empty() causes scrolling.

we should record scrollTop and scrollLeft before empty() and restore them after empty() , i provide a patch ,hope helpful.

Attachments (2)

scroll.patch (843 bytes) - added by yiminghe 9 years ago.
7080_TC.html (2.7 KB) - added by Garry Yao 9 years ago.

Download all attachments as: .zip

Change History (8)

Changed 9 years ago by yiminghe

Attachment: scroll.patch added

Changed 9 years ago by Garry Yao

Attachment: 7080_TC.html added

comment:1 Changed 9 years ago by Garry Yao

Keywords: scroll selection empty removed
Status: newpending

WFM with attached TC, any clue?

comment:2 Changed 9 years ago by yiminghe

yes , i can reproduce on 7080_TC.html:

steps :

  1. insert a page-break('插入分页符')(or image,smiley) into editor (important!).
  2. keep focus(cursor) in the editor (important) and scroll to 'click button' using mouse wheel (important) .
  3. click button

expected :

window does not scroll

actual :

window scrolls to editor

ps :see screen video attached

comment:4 Changed 8 years ago by Jakub Ś

Keywords: IE6 IE7 added
Status: pendingconfirmed
Version: 3.5.13.2.1

This issue has reproducible in IE6 and IE7 from CKEditor 3.2.1.

  1. Copy attached TC to samples folder
  2. Click inside editor
  3. Insert page break by clicking on a toolbar button
  4. Scroll down to button and click on it

Result: Browser will scroll up to cursor location.

comment:5 Changed 8 years ago by Garry Yao

Status: confirmedpending

Has it been expired on trunk?

comment:6 Changed 8 years ago by Jakub Ś

Status: pendingconfirmed

I have just checked TC from comment:4.
Problem is still reproducible on latest trunk.

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