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

Comments Button Problem #408

Open
kemaltulum opened this issue Dec 31, 2018 · 4 comments
Open

Comments Button Problem #408

kemaltulum opened this issue Dec 31, 2018 · 4 comments

Comments

@kemaltulum
Copy link
Contributor

When clicked on the comments on an event card, the event detail page should be opened and the comments section is scrolled down.

I could not make scroll the page when needed with several methods.

  • DOM ScrollIntoView function
  • Ion-content ScrollByPoint() function

I think there are some problems related with angular.

@okyksl
Copy link
Contributor

okyksl commented Dec 31, 2018

@kemaltulum I think I resolved the issue:

<div class="event-wrapper" *ngIf="let e = event">

The *ngIf above causes primitive loaded component/page without any of dom content inside that div. What we can do instead is:

  • Stop utilizing *ngIf at top level.
  • Use type safe template guard - ?, when trying to access elements of the event.

I'm waiting for your input on whether the issue is resolved with these changes.

@okyksl
Copy link
Contributor

okyksl commented Dec 31, 2018

Side note, one can utilize ViewportScroller of Angular to handle scroll related jobs or you can utilize ion-content scrolling functionalities that is provided by Ionic.

@okyksl
Copy link
Contributor

okyksl commented Dec 31, 2018

Utilize

<ion-button [disabled]="view" color="secondary" fill="clear" [routerLink]="['/feed', e._id]" fragment="comments">

fragment and routerLink in navigation from the EventCardComponent to EventPage.

@okyksl okyksl assigned kemaltulum and unassigned okyksl Jan 1, 2019
@kemaltulum
Copy link
Contributor Author

Utilize

<ion-button [disabled]="view" color="secondary" fill="clear" [routerLink]="['/feed', e._id]" fragment="comments">

fragment and routerLink in navigation from the EventCardComponent to EventPage.

The code was in this way, I changed it to prevent event propagation, clicking comment button creating event click on the event card.

I inspected the code quickly. @okyksl probably you are right but I cannot manage to find a practical solution

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

No branches or pull requests

2 participants