Permalink
4 comments
on commit
sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
1 changed file
with
6 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
06e56ac
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the purpose of including the condition 'event.target.offsetWidth !== 0'?
IE<9 is crashing on this function due to invisible objects attempting to gain focus, but that's only happening because offsetWidth is non-zero. I don't understand why the embargo is only included if offsetWidth is not 0.
06e56ac
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if offsetWidth is 0 the element is hidden from the user's view and cannot be focused in oldIE. Some other browsers disregard this but it doesn't make sense as far as I can tell.
What is the useful purpose of focusing a non-visible element?
06e56ac
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of course there is no useful purpose of focusing a non-visible element. The issue I'm having is that this is crashing IE<9 because jquery mobile attempts to focus hidden elements somewhere. (I understand this is not the fault of jquery) I was just curious as to what purpose the offsetWidth condition served. Thank you for explaining.
06e56ac
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought that Mobile had fixed the problem in 1.01, I worked with them to find a case where they were first trying to focus an element and then showing it. If you're experiencing a problem be sure there is a ticket with a test case in their tracker.