Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in handling buttons and other clickable controls in IE8 and higher #1374

Open
mauritslamers opened this issue Jul 3, 2016 · 0 comments

Comments

@mauritslamers
Copy link
Member

When a user presses a button in IE8 (and probably also higher), IE will create three events: a mousedown, a mouseup and a click event. SproutCore seems to be dealing with this situation by only accepting the mousedown and mouseup events by catching the click event in this case (done in SC.RootResponder).

However, it turns out that there are situations in which only a click is generated. This situation is that a user using both IE and a screenreader presses a button. Chrome and Firefox automatically convert this to mousedown and mouseup, IE however does not. SproutCore still catches the click event, causing any clickable view to not be clickable.

The "offending" line is https://github.com/sproutcore/sproutcore/blob/master/frameworks/core_foundation/system/root_responder.js#L2189. It is obvious that it is intended to catch browser behavior which allows actions on a click event where the mouseDown and mouseUp events already have been handled.
From the code and my own logging I have understood that in these cases the click event will be generated last. However, the current solution will in this case catch all click events because the conditions will always be true, in the sense that a mouseup always will have been taken place before.

So the question becomes: is it possible (and if yes, how) to know whether an isolated click event takes place?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant