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

Maxiumum call stack error with paper chips in acceptance test #633

Open
arschmitz opened this issue Jan 30, 2017 · 5 comments
Open

Maxiumum call stack error with paper chips in acceptance test #633

arschmitz opened this issue Jan 30, 2017 · 5 comments

Comments

@arschmitz
Copy link

using the keyEvent helper in acceptance tests to add items to a paper-chips component causes a maximum call stack error in phantomjs but works fine in browser this is a huge pain for testing on travis though the code is simply

keyEvent('.chips-wrapper input', 'keyup', 13)
@cah-danmonroe
Copy link
Contributor

I see this also with integration tests. We are using ember-native-dom-helpers

@arschmitz
Copy link
Author

Just for reference I'm not using ember-native-dom-helpers. I have stopped using phantomjs but do actually see this in chrome too just there it seems to be random happening about 50% of the time.

@markdicksonjr
Copy link

markdicksonjr commented Sep 25, 2017

It looks like "input.is('focus')" keeps returning false in ember-chips::inputFocus, causing focus to be set infinitely. And ember-native-dom-helpers::fillIn (and presumably the tests written by those not using ember-native-dom-helpers) will set focus, set text, fire 'input' event, fire 'change' event, sparking this infinite loop.

ember-chips::inputFocus:

inputFocus: function inputFocus(autocomplete) {
        var input = this.getInput();

        this.set('focusedElement', 'input');

        if (!this.get('content').length && !input.is(':focus')) {
          input.focus(); // THIS JUST KEEPS GETTING CALLED
        } else {
          this.set('activeChip', -1);
        }
        ...
}

This is very likely related to an open phantomjs bug: ariya/phantomjs#10427

@arschmitz
Copy link
Author

arschmitz commented Sep 26, 2017

@markdicksonjr this is 100% not a phantomjs bug. I stopped testing in phantom and it happens randomly in chrome too. Actually after upgrading to latest ember and latest ember-paper its no longer random and happens on every run.

@markdicksonjr
Copy link

markdicksonjr commented Sep 26, 2017

@arschmitz I wrote tests around chips in #828 and fixed a small (missing) conditional check, and it no longer happens for me in Chrome at all

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

3 participants