-
-
Notifications
You must be signed in to change notification settings - Fork 870
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(event-click): clicking actual events now triggers eventClicked #568
Conversation
Codecov Report
@@ Coverage Diff @@
## master #568 +/- ##
==========================================
- Coverage 96.66% 96.54% -0.13%
==========================================
Files 34 34
Lines 600 608 +8
Branches 62 66 +4
==========================================
+ Hits 580 587 +7
Misses 1 1
- Partials 19 20 +1
Continue to review full report at Codecov.
|
This is actually by design, really the event should be called |
Can't we just stop the event propagation when clicked on one of the actions by using |
Unfortunately that doesn't work when people use hammerjs and then you have to litter the codebase with hacks like this: https://github.com/mattlewis92/angular-calendar/blob/master/src/modules/month/calendar-month-view.component.ts#L344-L349 |
Hmm if its already there, we could put in a directive if its about the hack itself not about performance or whatever. WDYT? I think its worth it. As smaller the title and bigger the screen there is a lot of space not clickable right now. |
Ah event actions totally slipped my mind and testing. I'll take a look if I it's possible to handle the scenario gracefully. |
Latest change simply ignores event propagation from inner elements as kind of a hack. So far I haven't been able to test using Hammerjs as I'm unfamiliar with the framework, let me know if there are any issues with it. |
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.
So sorry about the late reply on looking into this! I've just checked it out locally and it looks like this change breaks the cursor changing when you mouse over the edges of a resizable event, could you take a look please? Thanks 😄 Other than that, LGTM
Oh that is odd, I will look into it! Thanks for the review and dealing with me, still new to this :) |
BREAKING CHANGE: eventClicked now fires whenever the event container instead of the event title is clicked Closes #568
BREAKING CHANGE: eventClicked now fires whenever the event container instead of the event title is clicked Closes #568
Merging this cleanly got a bit funky, so I've done it locally and fixed the issues with the cursor here: 403e127 (I also found a way to make the stopPropagation work seamlessly without any changes to the rest of the code 🎉 ) It'll be part of Thanks again for your contribution! 👍 |
Thank you, I meant to look into this but didn't find any time :-) |
Event titles used to only trigger eventClicked events. This doesn't make sense, so trigger eventClicked when the actual event item (week or day) is clicked.