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

auto hide #10

Open
KruglovDV opened this issue Apr 9, 2018 · 2 comments
Open

auto hide #10

KruglovDV opened this issue Apr 9, 2018 · 2 comments

Comments

@KruglovDV
Copy link

скролл не скрывается почему-то, как при overflow: auto
может что-то в props надо передать?

import Baron from 'react-baron/dist/es5';
import 'react-baron/src/styles.css';

export default class Tesst extends React.Component {
  render() {
    return (
      <div style={{ height: '400px', width: '400px' }}>
        <Baron>
          <p>agaaaha ddsdfsdfsdgsdgddfjhsdgkjhdafkgjhkfhfhafgalkjfglakjglajgflajglj</p>
          <p>agaaaha ddsdfsdfsdgsdgddfjhsdgkjhdafkgjhkfhfhafgalkjfglakjglajgflajglj</p>
          <p>agaaaha ddsdfsdfsdgsdgddfjhsdgkjhdafkgjhkfhfhafgalkjfglakjglajgflajglj</p>
          <p>agaaaha ddsdfsdfsdgsdgddfjhsdgkjhdafkgjhkfhfhafgalkjfglakjglajgflajglj</p>
          <p>agaaaha ddsdfsdfsdgsdgddfjhsdgkjhdafkgjhkfhfhafgalkjfglakjglajgflajglj</p>
          <p>agaaaha ddsdfsdfsdgsdgddfjhsdgkjhdafkgjhkfhfhafgalkjfglakjglajgflajglj</p>
          <p>agaaaha ddsdfsdfsdgsdgddfjhsdgkjhdafkgjhkfhfhafgalkjfglakjglajgflajglj</p>
          <p>agaaaha ddsdfsdfsdgsdgddfjhsdgkjhdafkgjhkfhfhafgalkjfglakjglajgflajglj</p>
          <p>agaaaha ddsdfsdfsdgsdgddfjhsdgkjhdafkgjhkfhfhafgalkjfglakjglajgflajglj</p>
          <p>agaaaha ddsdfsdfsdgsdgddfjhsdgkjhdafkgjhkfhfhafgalkjfglakjglajgflajglj</p>
          <p>agaaaha ddsdfsdfsdgsdgddfjhsdgkjhdafkgjhkfhfhafgalkjfglakjglajgflajglj</p>
          <p>agaaaha ddsdfsdfsdgsdgddfjhsdgkjhdafkgjhkfhfhafgalkjfglakjglajgflajglj</p>
          <p>agaaaha ddsdfsdfsdgsdgddfjhsdgkjhdafkgjhkfhfhafgalkjfglakjglajgflajglj</p>
          <p>agaaaha ddsdfsdfsdgsdgddfjhsdgkjhdafkgjhkfhfhafgalkjfglakjglajgflajglj</p>
          <p>agaaaha ddsdfsdfsdgsdgddfjhsdgkjhdafkgjhkfhfhafgalkjfglakjglajgflajglj</p>
          <p>agaaaha ddsdfsdfsdgsdgddfjhsdgkjhdafkgjhkfhfhafgalkjfglakjglajgflajglj</p>
        </Baron>
      </div>
    );
  }
}
@Diokuz
Copy link
Owner

Diokuz commented Apr 14, 2018

Добавил case4 в папку с тестами, но воспроизвести не удалось. Может быть скроллится какой-то другой блок вместо барона, и на нем стоит overflow: scroll? Как это визуально выглядит?

@Diokuz
Copy link
Owner

Diokuz commented Apr 14, 2018

Попробуй выполни вот этот скрипт (в тот момент, когда скроллбар должен был быть спрятан, но не спрятан) и напиши что он выведет в консоль.

!function(){console.group("Baron diagnosis");var o=document.querySelectorAll("[data-baron-v-id]");console.log("Total barons found: ",o.length),o.forEach(function(o,t){var e=o.children[0];console.group("Baron root "+t),console.log("Root: ",o),console.log("Maybe scroller: ",e),console.log("Root data: ",{scrollHeight:o.scrollHeight,offsetHeight:o.offsetHeight,overflow:o.style.overflow,clientWidth:o.clientWidth,offsetWidth:o.offsetWidth}),console.log("Scroller data: ",{scrollHeight:e.scrollHeight,offsetHeight:e.offsetHeight,clientWidth:e.clientWidth,offsetWidth:e.offsetWidth}),console.groupEnd()})}();

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

No branches or pull requests

2 participants