Skip to content

Commit 7f044d9

Browse files
author
vzaets
committed
MAGETWO-38001: Merchant isn't navigated to tab with failed JS validation
1 parent 62f5876 commit 7f044d9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/web/mage/backend/tabs.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@
183183
panel.attr("aria-labelledby", anchorId);
184184
if (that.options.excludedPanel.indexOf(anchorId+'_content') < 0) {
185185
panel.addClass(that.options.tabPanelClass);
186-
};
186+
}
187187
});
188188

189189
this.panels
@@ -318,7 +318,11 @@
318318
* @protected
319319
*/
320320
_onInvalid: function(e) {
321-
var cssError = '_error';
321+
var cssError = '_error',
322+
fakeEvent = e;
323+
324+
fakeEvent.currentTarget = $(this.anchors).eq(e.data.index);
325+
this._eventHandler(fakeEvent);
322326

323327
this.anchors.eq(e.data.index).addClass(cssError).find('.' + cssError).show();
324328
this._updateNavTitleMessages(e, cssError);

0 commit comments

Comments
 (0)