Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#6112 closed defect (fixed)

[patch][ccla]Editor scrolling bugs on IE with large text

Reported by: guest Owned by: alex
Priority: high Milestone: 1.1
Component: Editor Version: 1.0
Keywords: editor scrolling ie Cc:
Blocked By: Blocking:

Description (last modified by Adam Peller)

One of our product teams reported the following problems with Editor.

  • Type some text in a Dojo editor for at least a couple of pages (causing the scroll bar to show)
  • go to the bottom on the document (scrolled down) and then highlight some text with the keyboard (shift/arrows)
    • bug 1: if you try to highlight with a double-click, the editor scrolls back up to the top
  • once the text is highlighted, bold it (either with Ctrl-B or by clicking on the Bold icon)
    • bug 2: the editor scrolls back to the top

The problems occur on both Dojo 0.4 and 1.0 and was able to reproduce this problem. But on FCK, i couldn't. This leads us be to believe it's a Dojo bug and not a core IE problems because underneath both implementations lies the same IE control.

This is clearly a really bad bug that makes the Dojo editor on IE unusable but for the simplest of typing.

This bug has shown up on several sites which use Dojo 1 and 0.4 on IE 6 and 7. I believe this makes the editor useless in IE except for basic text typing of very short text.

Attachments (5)

6112.patch (1.5 KB) - added by liucougar 12 years ago.
patch to fix the issue
6112_focus.patch (3.0 KB) - added by liucougar 12 years ago.
fix #6112 while keep #4996 and #5835 working
6112_haysmark.patch (1.7 KB) - added by Douglas Hays 12 years ago.
Fix blur/click scroll problem - bug#2 in the problem description remains
editorScroll_strictMode.patch (959 bytes) - added by Adam Peller 12 years ago.
patch from Mehmet Akin (IBM)
editorScroll_strictMode.2.patch (868 bytes) - added by Douglas Hays 12 years ago.
same patch but reformatted to use relative filenames - verified the patch fixes bug 2 on IE6

Download all attachments as: .zip

Change History (21)

comment:1 Changed 12 years ago by liucougar

Component: GeneralEditor
Owner: changed from anonymous to liucougar

comment:2 Changed 12 years ago by Adam Peller

Description: modified (diff)
Milestone: 1.1
Priority: normalhigh
severity: normalmajor

comment:3 Changed 12 years ago by Adam Peller

Owner: changed from liucougar to slightlyoff

comment:4 Changed 12 years ago by Adam Peller

Owner: changed from slightlyoff to alex

comment:5 Changed 12 years ago by Douglas Hays

This is much worse in 1.1. Clicking scrolled content in the editor area causes the editor to scroll to the top and the input caret is not even close to where you clicked.

comment:6 Changed 12 years ago by Adam Peller

Owner: changed from alex to liucougar

Cougar's got a handle on this.

Changed 12 years ago by liucougar

Attachment: 6112.patch added

patch to fix the issue

comment:7 Changed 12 years ago by liucougar

Status: newassigned

bill, is the patch for focus.js look ok for you?

comment:8 Changed 12 years ago by liucougar

Resolution: fixed
Status: assignedclosed

(In [13071]) fixes #6112

comment:9 Changed 12 years ago by Douglas Hays

Resolution: fixed
Status: closedreopened

I applied the patch and I'm not seeing any change in the bad behavior. I'm running IE6 on WinXP.
Load test_Editor.html
Click in the text area of the first Editor box (Created from div).
Hold down the ENTER key until the scroll bar appears - then add a few more blank lines and then some text at the end.
Click away from the Editor in open whitesspace of the document to cause a blur.
Click back to the same Editor on the last line of text.
The Editor scrolls to the top and the last line is not visible and the input caret is changed.

Changed 12 years ago by liucougar

Attachment: 6112_focus.patch added

fix #6112 while keep #4996 and #5835 working

Changed 12 years ago by Douglas Hays

Attachment: 6112_haysmark.patch added

Fix blur/click scroll problem - bug#2 in the problem description remains

comment:10 Changed 12 years ago by Douglas Hays

(In [13076]) References #6112. Proxy commit for haysmark. Fix tabbing on IE for Editor and prevent scrolling to the top on focus.

comment:11 Changed 12 years ago by Douglas Hays

Bug 2 in the problem description remains.

comment:12 Changed 12 years ago by Adam Peller

Owner: changed from liucougar to alex
Status: reopenednew

comment:13 Changed 12 years ago by Adam Peller

Comment By: Mehmet Akin (mehmeta) Date: 2008-03-17 01:43 GMT

If the page is in quirks mode and you focus the iframe manually with focus() or with the Tab-button IE will always scroll to the top of the iframe. If the page has a strict doctype, than the focusing with the tab-button lets the cursor position appear on the correct position like in FF and does not scroll to the top, but if u press any of the editor plugins, e.g. bold, italic, etc. the iframe is still scrolled to the top. This is caused by the manual focusing of the iframe with "this.editNode.focus()" in line 848 in Richtext.js. Since it works correct when the browser handles the focusing I attached a patch where I remove that manual focusing and fire an onfocus event to the iframe , so IE handles the focusing and it works fine. I had no time yet to write a patch for quirks mode. The idea for quirks would be maybe to first focus the iframe and then scroll to the latest cursor position manually with dijit.moveToBookmark() or so.

Changed 12 years ago by Adam Peller

patch from Mehmet Akin (IBM)

Changed 12 years ago by Douglas Hays

same patch but reformatted to use relative filenames - verified the patch fixes bug 2 on IE6

comment:14 Changed 12 years ago by Douglas Hays

Summary: Editor scrolling bugs on IE with large text[patch][ccla]Editor scrolling bugs on IE with large text

comment:15 Changed 12 years ago by alex

Resolution: fixed
Status: newclosed

(In [13156]) merging supplied patch from Mehmet Akin of IBM to fix a pretty bad editing behavior issue on IE. I've tested in both standards and quirks mode on IE 6 and the results appear to be the same. I'm not sure we need another patch. Fixes #6112

comment:16 Changed 12 years ago by Adam Peller

(In [13734]) remove test. Refs #6112

Note: See TracTickets for help on using tickets.