fossasia / susi_chromebot

SUSI.AI Chrome Extension
GNU Lesser General Public License v2.1
1.54k stars 139 forks source link

Add scroll to top in scroll window #342 #424

Closed fragm3 closed 5 years ago

fragm3 commented 5 years ago

Fixes #342

Closed PR https://github.com/fossasia/susi_chromebot/pull/371 due to some multiple merge conflicts.

Checklist

Short description of what this resolves:

Added scroll to top functionality scroll-up-down

Changes proposed in this pull request:

fragm3 commented 5 years ago

Using ternary wont work here, error:

screenshot 2018-10-06 at 4 14 46 pm

@ms10398 @gabru-md @rupav @zamhaq please review

gabru-md commented 5 years ago

@fragm3 can you try it in this way ?

scrollIconBottom.style.display = (messages.scrollTop === 0)? "block":"none" ;

the screenshot says that there is no assignment, so you can use the way I suggested above. Give it a try and if it works, then it is good, else we can simply merge this PR of yours and then iterate on this one.

gabru-md commented 5 years ago

helpss

something like this should get this working in no time. if there is still some problem then we can do it in the later PRs.

Thanks! Cheers!

fragm3 commented 5 years ago

Done , please review @gabru-md @ms10398 @zamhaq

fragm3 commented 5 years ago

@rupav Done the changes, squashed the commits.