-
Notifications
You must be signed in to change notification settings - Fork 153
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
"You modified "attachmentClass" twice" assertion failure when used with ember-tether #260
Comments
Thanks for the report @pgengler. I assume from your wording that this does not happen with the most recent release? |
It seems like it is happening with the released 3.0.0-beta.0 as well (sorry, I've been working on upgrading an app so there are a lot of dependencies changing). It seems like this is Ember-version dependent - it starts happening with Ember 3.2 and up; with 3.1 it works. |
I've been struggling with this for the past few hours on Ember 3.3 after upgrading. Google brought me here. Good to see that it doesn't necessarily have to be me who broke my own build. 😉 However, when removing
Similar to #248 but this is not a test. It doesn't help to add a custom |
I did a little more digging and the problem seems to be here: https://github.com/yapplabs/ember-modal-dialog/blob/master/addon/components/tether-dialog.js#L19 ( With
import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { render } from '@ember/test-helpers';
import hbs from 'htmlbars-inline-precompile';
module('Integration | Component | tether-dialog', function(hooks) {
setupRenderingTest(hooks);
test('without attachment', async function(assert) {
await render(hbs`
<div id="tether-target"></div>
{{#modal-dialog
tetherTarget="#tether-target"
}}
Hi
{{/modal-dialog}}
`);
assert.ok(true);
});
test('with attachment', async function(assert) {
await render(hbs`
<div id="tether-target"></div>
{{#modal-dialog
attachment="middle center"
tetherTarget="#tether-target"
}}
Hi
{{/modal-dialog}}
`);
assert.ok(true);
});
});
|
BTW, for anyone else having this problem, as a workaround I've created import ModalDialog from 'ember-modal-dialog/components/modal-dialog';
export default ModalDialog.extend({
attachment: 'middle center'
}); |
@pgengler Exactly what I needed, thank you! |
I'm trying to use 5ad754f (the most recent commit to
master
as of right now, to get the isDestroyed fix from #255) and I get an assertion failure when using ember-modal-dialog with ember-tether:I was able to reproduce this in a new app that only includes ember-modal-dialog/ember-tether (see https://github.com/pgengler/ember-modal-dialog-double-modified-bug).
The short version is that this:
will trigger the assertion; if
tetherTarget
is omitted then it works.The text was updated successfully, but these errors were encountered: