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

If I change a date or check a checkbox in a list the changes are not shown on the card #5

Open
luckyshot opened this issue Oct 5, 2015 · 2 comments
Labels

Comments

@luckyshot
Copy link
Owner

If I change a date or check a checkbox in a list the changes are not shown on the card. If the extension is deaktivated it works fine. I am using chrome version 43.0.2357.124 and also tried the portable version 43.0.2357.130

@luckyshot luckyshot added the bug label Oct 5, 2015
@luckyshot
Copy link
Owner Author

Problem is that the extension doesn't see a change in the board.

It needs better change detection, previous versions relied on a 5 second timer interval that did a content length count to see if anything had been modified, although it wasn't the best performant way, so I changed it to a mouseup+keyup event attached to although it is not very reliant.

Anyone got good ideas on how to solve this?

@JorgeBoscan
Copy link
Contributor

This works for refreshing the cards as soon as the user exits the card detail page.

var regexShortLink      = /c\/([^/]+)\/.+/g;
$('.window-wrapper').bind("DOMSubtreeModified",function(){
    if (window.location.href.match(regexShortLink) && !cardDetailOpen)
    {
        cardId = regexShortLink.exec(window.location.href)[1];
        regexShortLink.lastIndex = 0;
        cardDetailOpen = true;
    } else if (!window.location.href.match(regexShortLink) && cardDetailOpen)
    {
        cardDetailOpen = false;
        _run();
    }
});

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

No branches or pull requests

2 participants