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

wrong offset for scrollable grandchildren #43

Open
mynery opened this issue Apr 4, 2020 · 0 comments
Open

wrong offset for scrollable grandchildren #43

mynery opened this issue Apr 4, 2020 · 0 comments

Comments

@mynery
Copy link

mynery commented Apr 4, 2020

If I create a scrollable box with grandchildren, I expect them to move in sync with their respective parents, but they don't.

My example is the following:

const blessed = require('neo-blessed');                                                           

screen = blessed.screen({smartCSR: true});
screen.key(['C-c'], function(ch, key) {
  return process.exit(0);
});

var brokenbox = blessed.box({
  height: 5, width: 7,
  keys: true, scrollable: true, alwaysScroll: true
});
for (var i = 0; i < 10; i++) {
  var button = blessed.button({
    top: i, width: 5, height: 1,
    content: i.toString()
  }); 
  button.append(blessed.text({ top: 0, right: 0, content: i.toString() }));
  brokenbox.append(button);
}
screen.append(brokenbox);
brokenbox.focus();

screen.render();

Expected behavior: If I scroll down once, the last line shows "5 5".
Actual behavior: If I scroll down once, the last line shows "5", the line above shows "4 5".

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

1 participant