notiz-dev / notiz

Frontend for notiz.dev. Built with Angular and Scully 👋
https://notiz.dev
67 stars 9 forks source link

fix: highlight only until AngulaReady Event #107

Closed marcjulian closed 4 years ago

marcjulian commented 4 years ago

DONT MERGE.

If you open a post and select another related post ngOnit is not rerun. Thus not working 100%.

For example open blog/angular-10-with-tailwindcss and select blog/floating-form-field-with-tailwindcss from related post. Highlight is not run on the new post. However, if you select a tag or another page, which leaves BlogPost page, when you enter it again ngOnit is triggered correctly

marcjulian commented 4 years ago

@garygrossgarten now you can select the text, as highlight is not rerun always on ngAfterViewChecked. However, is not correctly working right now when switching a page as described above.

garygrossgarten commented 4 years ago

@marcjulian just run on angularready once? Instead of checked

marcjulian commented 4 years ago

@garygrossgarten I tried that, but the event is to late. Thus the content is displayed and highlight will take affect a few seconds later. But then it works without a problem when navigating from related post to another post.

Screen Recording 2020-07-21 at 10 53 44

marcjulian commented 4 years ago

@garygrossgarten please test it again. I allow highlighting on NavigationStart.