Opened 10 years ago

Closed 10 years ago

#10126 closed defect (fixed)

Regression: IE: Clicking iframe scrollbar in editor causes the content to jump to the bottom

Reported by: Jared Jurkiewicz Owned by: Douglas Hays
Priority: high Milestone: 1.4
Component: Editor Version: 1.4.0b
Keywords: Cc: Douglas Hays, bill, liucougar
Blocked By: Blocking:

Description

IE: Clicking iframe scrollbar in editor causes the content to jump to the bottom

This is really ugly and makes it hard to use the scrollbar to scroll IE editor content.

Attachments (2)

test_Editor_Jump.html (18.6 KB) - added by Jared Jurkiewicz 10 years ago.
Testcase showing it. Just click the scrollbar handle for editor and watch it jump
scrollJump.patch (644 bytes) - added by Jared Jurkiewicz 10 years ago.
Potential patch for trying to identify click events on scrollers or on body.

Download all attachments as: .zip

Change History (11)

Changed 10 years ago by Jared Jurkiewicz

Attachment: test_Editor_Jump.html added

Testcase showing it. Just click the scrollbar handle for editor and watch it jump

comment:1 Changed 10 years ago by Jared Jurkiewicz

Problem occurs in: 1.3, 1.4b1

Does NOT occur in: 1.2

comment:2 Changed 10 years ago by Jared Jurkiewicz

Keywords: doughays bill liucougar added

This is caused by the introduction of the following in 1.3:

dijit/Editor.js:

_onIEMouseDown: function(/*Event*/ e){

summary: IE only to prevent 2 clicks to focus tags: private delete this._savedSelection; new mouse position overrides old selection if(e.target.tagName == "BODY"){

setTimeout(dojo.hitch(this, "placeCursorAtEnd"), 0);

} this.inherited(arguments);

},

That setTimeout to shift the body to the end causes the scrollers to glitch horribly.

Does anyone know why that was added?

comment:3 Changed 10 years ago by Jared Jurkiewicz

That was you Doug!

16555 doughays delete this._savedSelection; new mouse position overrides old selection

16555 doughays if(e.target.tagName == "BODY"){ 16555 doughays setTimeout(dojo.hitch(this, "placeCursorAtEnd"), 0); 16555 doughays } 16555 doughays this.inherited(arguments); 16555 doughays },

comment:4 Changed 10 years ago by Jared Jurkiewicz

Caused by: http://bugs.dojotoolkit.org/changeset/16555

Is it necessary to scroll it to the end? Or was that just something you did because you thought it would help?

comment:5 Changed 10 years ago by Jared Jurkiewicz

I see, it was probably to fix that editor click empty regression. Oof. Well, I think I have a fix for it. Check that the click was within clientwidth/clientHeight of target if it was body. If it was, then it wasn't a scroller. Scrollbar x/y are outside clientWidth/height. Though ... I also need to check if it is scrolled and add that too. Hm

comment:6 Changed 10 years ago by Jared Jurkiewicz

Cc: Douglas Hays bill liucougar added
Keywords: doughays bill liucougar removed
Milestone: tbd1.4

comment:7 Changed 10 years ago by Jared Jurkiewicz

Summary: IE: Clicking iframe scrollbar in editor causes the content to jump to the bottomRegression: IE: Clicking iframe scrollbar in editor causes the content to jump to the bottom

comment:8 Changed 10 years ago by Jared Jurkiewicz

Owner: set to Douglas Hays

Assigning to you, Doug, for review. (Since you broke it!).

Does this seem reasonable as a fix?

Changed 10 years ago by Jared Jurkiewicz

Attachment: scrollJump.patch added

Potential patch for trying to identify click events on scrollers or on body.

comment:9 Changed 10 years ago by Douglas Hays

Resolution: fixed
Status: newclosed

(In [20597]) Fixes #10126. Ignore mouse down events in IE that are outside the actual editing area.

Note: See TracTickets for help on using tickets.