We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6abcb32 commit 83e6ef2Copy full SHA for 83e6ef2
src/behaviors/attach/attach.js
@@ -542,11 +542,15 @@ const events = {
542
};
543
544
const mutations = {
545
- 'attributes'({ attributeName, attributeValue, settings, self }) {
546
- if (!settings.observeChanges === true || !attributeName === 'style' || !attributeValue.includes('display')) {
547
- return;
+ 'attributes'({ attributeName, attributeValue = '', settings, self }) {
+ if (settings.observeChanges) {
+ // only obverve changes that cause layout changes
548
+ const styleChanged = attributeName == 'style';
549
+ const displayChanged = attributeValue.includes('display');
550
+ if (styleChanged && displayChanged) {
551
+ self.reposition();
552
+ }
553
}
- self.reposition();
554
},
555
556
0 commit comments