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

Unexpected autoscrolling behaviour when clicking a table row #942

Closed
classifaddict opened this issue May 9, 2019 · 5 comments
Closed

Unexpected autoscrolling behaviour when clicking a table row #942

classifaddict opened this issue May 9, 2019 · 5 comments
Labels
ext-table stale Flagged by stalebot waiting

Comments

@classifaddict
Copy link

classifaddict commented May 9, 2019

Hi,

My app is made of a multiple columns table in which additional column may contains some links triggering a function that open a popup window.

Using version 2.29.x, clicking a link just open the popup window

Using 2.30.2, clicking the same link makes the row scrolling to the middle of the window.
Then, only if I click the link a second time the popup window opens.

Is this a bug or is there a way to bypass the first click event using 2.30.2?

Tree options:
    'scrollParent': window,
    'scrollOfs': {
        'top': window.innerHeight / 2,
        'bottom': window.innerHeight / 2
    }
    'selectMode': 1,
    'click': function(e, data){
        if (data.targetType == 'expander') {
             data.node.user_collapsed = true;
        } else {
              return false;
        }
    }

I also tried 'unselectable': true

Environment

  • Browser type and version: Chrome 73, FF 66, Edge 41
  • jQuery and jQuery UI versions: 3.4.1
  • Fancytree version: 2.30.2
    enabled/affected extensions: table

Thanks a lot for maintaining this great FancyTree,
Olivier

@mar10
Copy link
Owner

mar10 commented May 11, 2019

What is the intention of setting scrollOfs? Does it work. if you comment this?

@mar10 mar10 added the waiting label May 11, 2019
@classifaddict
Copy link
Author

The intention is to scroll a node to the middle of the window using node.scrollIntoView({'topNode': node})
It's true that clicking a link now works if I don't set scrollOfs but I can no longer scroll a node to the middle of the window.

@stale
Copy link

stale bot commented Oct 22, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Oct 22, 2019
@mar10 mar10 added stale Flagged by stalebot and removed wontfix labels Oct 22, 2019
@stale stale bot removed the stale Flagged by stalebot label Oct 22, 2019
@stale
Copy link

stale bot commented Jan 20, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Flagged by stalebot label Jan 20, 2020
@stale stale bot closed this as completed Feb 3, 2020
@classifaddict
Copy link
Author

This bug is still present in version 2.37.0: it is not possible to click a link in a cell if the containing row is not selected first (i.e. one have to click twice to trigger a link in a non-selected row).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ext-table stale Flagged by stalebot waiting
Projects
None yet
Development

No branches or pull requests

2 participants