Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#16437 closed defect (fixed)

exception in IE relating to focus event when browser window reselected

Reported by: DaveHS Owned by: bill
Priority: undecided Milestone: 1.8.6
Component: Dijit Version: 1.8.1
Keywords: Cc:
Blocked By: Blocking:

Description

We have a grid within a tab container - double clicking on items in the grid opens a details record in a new tab. If the user clicks away from the browser at this point e.g. switches to another open application, then switches back to the browser, a javascript error is reported:

SCRIPT5007: Unable to get value of the property 'toLowerCase': object is null or undefined

This only happens if the browser is in strict mode (example attached).

We have traced this to the dijit focus.js code - a one line change is all that is required to fix it (we can supply details).

Attachments (2)

index.html (2.2 KB) - added by DaveHS 6 years ago.
Sample file showing the issue
focus.js.uncompressed.js.patch (530 bytes) - added by DaveHS 6 years ago.
Patch file with single line change to prevent the error.

Download all attachments as: .zip

Change History (10)

Changed 6 years ago by DaveHS

Attachment: index.html added

Sample file showing the issue

Changed 6 years ago by DaveHS

Patch file with single line change to prevent the error.

comment:1 Changed 6 years ago by bill

Milestone: tbd1.9
Status: newassigned

OK, I'll take a look. Thanks for the test file and patch.\

Do you happen to know what strange element is getting the focusin event? There's no tagName so I wonder if it's a text node or ... ?

comment:2 in reply to:  1 Changed 6 years ago by DaveHS

Replying to bill:

OK, I'll take a look. Thanks for the test file and patch.\

Do you happen to know what strange element is getting the focusin event? There's no tagName so I wonder if it's a text node or ... ?

Sorry, no idea - we can see that the event's srcElement object doesn't have a tagName - it looks like an empty object in the debugger... The last item to (sucessfully) have the focus is the TD from the grid.

Thanks for looking at it!

comment:3 Changed 6 years ago by bill

Summary: Javascript console error in IE (9) relating to focus eventexception in IE relating to focus event when browser window reselected

Indeed, very strange. OK, sure, I can check that in. BTW this happens in IE10 too.

The error is not critical since it aborts the exception aborts the handler in the same as the "return" statement in your patch, but I'll glady check it in anyway, to keep the console clean.

comment:4 Changed 6 years ago by bill

Resolution: fixed
Status: assignedclosed

In [30137]:

Avoid exception on IE when browser window refocused after switching to another application. Thanks DaveHS, fixes #16437 !strict.

comment:5 Changed 6 years ago by DaveHS

Thanks for doing that - and for checking it in IE10 too!

comment:6 Changed 6 years ago by bill

#17096 is a duplicate of this ticket.

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

In d22a72b0d372e1b7f2496396dcd009be7711736c/dijit:

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

comment:8 Changed 6 years ago by bill

Milestone: 1.91.8.6
Note: See TracTickets for help on using tickets.