Opened 5 years ago

Closed 5 years ago

Last modified 3 years ago

#17648 closed defect (fixed)

IE9,10,11(?) Hangs in some cases while changing focus

Reported by: fred01 Owned by: bill
Priority: undecided Milestone: 1.9.8
Component: Dijit Version: 1.9.1
Keywords: Cc:
Blocked By: Blocking:

Description

In rare cases IE9 and IE10 (not tested in IE11) drive to infinite recurse while some widget (TextArea? in my case) loose a focus. After deep investigation, i'm found this recurse relay on added event listeners in dojo focusManager. Actually problem with touchstart event in code

var mdh = on(targetWindow.document, 'mousedown, touchstart', function(evt){
        _this._justMouseDowned = true;
        setTimeout(function(){ _this._justMouseDowned = false; }, 0);

        // workaround weird IE bug where the click is on an orphaned node
        // (first time clicking a Select/DropDownButton inside a TooltipDialog).
        // actually, strangely this is happening on latest chrome too.
        if(evt && evt.target && evt.target.parentNode == null){
                return;
        }

        _this._onTouchNode(effectiveNode || evt.target, "mouse");
});

AFAIK IE9/10 doesn't support touchstart event (i'm know, it must be silently ignored, if it not supportred, but may be there is some problem with it?)

So, problem solved by this workaround

 var mdh = on(targetWindow.document, 'mousedown,'+(has('ie')?'MSPointerDown':'touchstart'), function(evt){

I think it's more convient way to define handler for focusManager purposes.

Change History (9)

comment:1 Changed 5 years ago by fred01

Hm... Still hangs. Look's like IE don't like second event type at all. Now works only in

 var mdh = on(targetWindow.document, 'mousedown'+(has('ie')?'':',touchstart'), function(evt){

variant

Last edited 5 years ago by fred01 (previous) (diff)

comment:3 Changed 5 years ago by bill

Sorry for the late reply. You can't make a self-contained test case? This description in this ticket is too vague for me to act on.

Are you really seeing an "infinite recurse", causing IE to throw an exception about being out stack space? Or did you simply mean that _onTouchNode() is getting called repeatedly (and rapidly)? And how do you reproduce the problem? You said you caused "some widget (TextArea? in my case) to lose focus", but was it by using the keyboard, or the mouse, or touching? And if by mouse/touch, what did you click?

It's true that IE has pointer events (MSPointerDown on IE9-10 and pointerdown on IE11) rather than touchstart/touchend events, but I think if I just listen to mousedown, the code you listed won't catch when the user touches the screen (on Surface tablets). It would make more sense for IE9+ to just listen to MSPointerDown/pointerdown, rather than listening to mousedown. Really, that code should be updated to:

on(targetWindow.document, touch.press, function(evt){
...

(where touch points to the dojo/touch module).

Last edited 5 years ago by bill (previous) (diff)

comment:4 Changed 5 years ago by bill

Milestone: tbd1.10
Owner: set to bill
Status: newassigned

Anyway, I'm going to change the code to use pointerdown / MSPointerDown if they are available, in preference to listening to a non-existant touchstart event. Hopefully that fixes your problem.

comment:5 Changed 5 years ago by Bill Keese <bill@…>

Resolution: fixed
Status: assignedclosed

In b24525552996dee6c41e299df5f995ba91953b91/dijit:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:6 Changed 3 years ago by beglee

I've run into a separate issue in the same area, which is fixed by the delivered fix here. Is there any chance this fix could be backported to 1.9 as well??

For full disclosure this is my use case, which I should probably create as a new bug:

  • Internet Explorer 11
  • User clicks a link to download a file
  • User opens a djDateTextBox dropdown date picker
  • As soon as the mouse is moved, the date picker dropdown disappears
  • "attrmodified-hovering" event on the date picker input was triggering this line from the code snippet above:

_this._onTouchNode(effectiveNode || evt.target, "mouse");

And that causes the picker to close. Rather unusual.

Last edited 3 years ago by beglee (previous) (diff)

comment:7 Changed 3 years ago by bill

Ok, sure.

comment:8 Changed 3 years ago by Bill Keese <bill@…>

In 9035bdc/dijit:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:9 Changed 3 years ago by bill

Milestone: 1.101.9.8

Now fixed in 1.9.8 and 1.10+.

Note: See TracTickets for help on using tickets.