GithubHelp home page GithubHelp logo

frsource / light-scrollbar Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 17.88 MB

Light-scrollbar allows you to build custom scrollbar, light scrollbar with just one line of code

Home Page: https://www.frsource.org/light-scrollbar

License: MIT License

JavaScript 15.01% SCSS 5.15% TypeScript 76.80% HTML 3.04%
css custom-scrollbar efficiency js scrollbar typescript ui

light-scrollbar's People

Contributors

dependabot[bot] avatar frsgit avatar renovate[bot] avatar semantic-release-bot avatar szymon-dziewonski avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

alalpod

light-scrollbar's Issues

Scrollbar stays active after clicking on it

Hi Szymon, ๐Ÿ‘‹ Phrase sends regards. We ran into minor bug with scrollbar.

Describe the bug
When user clicks on scrollbar ( or grab it and scroll with it ) and then release mouse, scrollbar stays active, so when user tries to select text in different element the scroll follows mouse move. Video should describe it better - https://share.getcloudapp.com/4gu4drPW

To Reproduce
Steps to reproduce the behavior:

  1. Go to the example page https://www.frsource.org/light-scrollbar/examples/default.html
  2. Click on scrollbar once ( or grab and scroll with it )
  3. Try to select text in sidebar

Expected behavior
Content in attached container is scrolled

Screenshots
Content in attached container is no affected by mouse interactions outside of container

Please complete the following information:

  • Version - latest - 1.4.14
  • Browser - Chrome

Additional context
I tried to fix it by changing line 396 from

outerElement.addEventListener("click", clickHandler);

to

outerElement.addEventListener("mousedown", clickHandler);
outerElement.addEventListener("mouseup", mouseUpHandler);

I hoped it would help as click event fires after mouseup, but it helped only partially. For some reason y-axis scrollbar was more responsive to this change, but x-axis didn't change it behavior at all, especially when I tried to select text under the attached element ( before mount, after mount sections )

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Awaiting Schedule

These updates are awaiting their schedule. Click on a checkbox to get an update now.

  • chore(deps): update cypress-io/github-action digest to 307a235
  • fix(deps): update dependency @frsource/frs-hide-scrollbar to v2.0.14

Detected dependencies

github-actions
.github/workflows/ci.yml
  • actions/checkout v3
  • pnpm/action-setup v2.2.4
  • actions/setup-node v3
  • actions/checkout v3
  • pnpm/action-setup v2.2.4
  • actions/setup-node v3
  • actions/checkout v3
  • pnpm/action-setup v2.2.4
  • actions/setup-node v3
  • cypress-io/github-action 4caf093719a6269a035c271e3f4114a0f82c671e
  • actions/upload-artifact v3
  • actions/checkout v3
  • pnpm/action-setup v2.2.4
  • actions/setup-node v3
  • actions/checkout v3
  • pnpm/action-setup v2.2.4
  • actions/setup-node v3
  • peaceiris/actions-gh-pages v3
npm
package.json
  • @frsource/frs-hide-scrollbar ^2.0.7
  • @algolia/client-search 4.17.1
  • @frsource/frs-replace 4.1.1
  • @semantic-release/changelog 6.0.3
  • @semantic-release/commit-analyzer 9.0.2
  • @semantic-release/git 10.0.1
  • @semantic-release/github 8.1.0
  • @semantic-release/npm 10.0.3
  • @semantic-release/release-notes-generator 11.0.2
  • @typescript-eslint/eslint-plugin 5.59.8
  • @typescript-eslint/parser 5.59.8
  • concurrently 8.0.1
  • cpy-cli 4.2.0
  • cypress 12.13.0
  • cypress-real-events ^1.7.4
  • eslint 8.41.0
  • eslint-config-prettier 8.8.0
  • eslint-plugin-cypress 2.13.3
  • eslint-plugin-eslint-comments 3.2.0
  • http-server 14.1.1
  • incstr 1.2.3
  • lodash-es ^4.17.21
  • microbundle 0.15.1
  • prettier 2.8.8
  • renamer 4.0.0
  • sass 1.62.1
  • semantic-release 21.0.2
  • ts-essentials 9.3.2
  • typescript 5.0.4
  • vitepress 1.0.0-beta.1
  • vue 3.2.47
  • wait-on ^7.0.1
  • node >=18.0.0

  • Check this box to trigger a request for Renovate to run again on this repository

Wrong scrollbar position with a lot of content

Hi Szymon, me again ๐Ÿ‘‹

Describe the bug
Scrollbar calculates --ls-bar-y-top variable wrong when it has a lot of content.

To Reproduce
Steps to reproduce the behavior:

  1. In docs, click on Add Dynamically item button at least 70 times ( a bit masochistic approach ๐Ÿ˜„ ) or just add v-for with at least 100 elements in scrollbarTemplate.vue - <span v-for="it in 100" :key="it">Some Content<br/></span>
  2. Look at both examples - inner and outside
  3. Scrollbar is positioned higher than container

Expected behavior
Scrollbar is positioned at container top and doesn't go higher

Screenshots
Screenshot from 2023-03-21 14-44-34
Screenshot from 2023-03-21 14-44-22

Please complete the following information:

  • Happens in Ubuntu and Mac ( probably Win too )
  • All browsers

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.