Magento 2.3.3 tab jumping on Top

Now, this functionality is embedded inside lib/web/mage/collapsible.js. And to disable scrolling and transfer this possibility to scroll to the initialization options need to create mixin for this jQuery widget.

app/design/frontend/<VendorName>/<ThemeName>/requirejs-config.js

var config = {
    config: {
        mixins: {
            'mage/collapsible': {
                'js/mage/collapsible-mixin': true
            }
        }
    }
};

app/design/frontend/<VendorName>/<ThemeName>/web/js/mage/collapsible-mixin.js

define([
    'jquery',
], function ($) {

    var hideProps = {},
        showProps = {};

    hideProps.height =  'hide';
    showProps.height =  'show';

    return function (widget) {

        $.widget('mage.collapsible', widget, {
            options: {
                scrollTo: false
            },

            _create: function () {
                this.storage = $.localStorage;
                this.icons = false;

                if (typeof this.options.icons === 'string') {
                    this.options.icons = $.parseJSON(this.options.icons);
                }

                this._processPanels();
                this._processState();
                this._refresh();

                if (this.options.icons.header && this.options.icons.activeHeader) {
                    this._createIcons();
                    this.icons = true;
                }

                if (this.options.scrollTo) {
                    this.element.on('dimensionsChanged', function (e) {
                        if (e.target && e.target.classList.contains('active')) {
                            this._scrollToTopIfVisible(e.target);
                        }
                    }.bind(this));
                }

                this._bind('click');
                this._trigger('created');
            },
        });

        return $.mage.collapsible;
    };
});

UPD: that was fixed in Magento 2.3.4 (Pull Request)


Looks like this have been fixed here. Worked for us. This will still trigger scrolling but only if the extended content extends beyond the bottom of the viewport. This solution has been merged to Magento repo by their team and this issue will be solved in next release.

Same issue on github. Hope this helps.

Tags:

Magento2