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
Fix touch handler synthetic click #228
Fix touch handler synthetic click #228
Conversation
Nice edge case! PS: I'm curious about what are you building with SVG |
Yep. Good thing is the
Here it is. The test will fail if the fix is reverted.
Nothing special, it's just an SVG icon inside of the trigger. This one in particular: http://take.ms/TeWjm :) |
Create `nativeTap` helper
@@ -54,7 +54,7 @@ export function clickTrigger(scope, options = {}) { | |||
} | |||
|
|||
export function tapTrigger(scope, options = {}) { | |||
let selector = '.ember-basic-dropdown-trigger'; | |||
let selector = `.ember-basic-dropdown-trigger ${options.triggerChildSelector || ''}`.trim(); |
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.
Instead of defining this ad-hoc option, you can use the nativeTap
function I've just added to trigger a tap in the element inside.
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.
Rebase over master to get that helper.
…/ember-basic-dropdown into fix-touch-handler-synthetic-click
Approved. Let's wait for travis. |
Thanks! |
If
e.target
is an SVG elementclick()
method doesn't exist. jQuery takes care of that.