diff --git a/js/ui/filter_builder/filter_builder.js b/js/ui/filter_builder/filter_builder.js
index c44851cbba1f..f9b0865caba6 100644
--- a/js/ui/filter_builder/filter_builder.js
+++ b/js/ui/filter_builder/filter_builder.js
@@ -719,13 +719,12 @@ var FilterBuilder = Widget.inherit({
onHiding: function(e) {
$button.removeClass(ACTIVE_CLASS);
},
- position: { my: position + " top", at: position + " bottom", offset: "0 1" },
+ position: { my: position + " top", at: position + " bottom", offset: "0 1", of: $button },
animation: null,
onHidden: function() {
removeMenu();
},
cssClass: FILTER_BUILDER_OVERLAY_CLASS + " " + options.menu.cssClass,
- target: $button,
rtlEnabled: rtlEnabled
});
@@ -737,7 +736,7 @@ var FilterBuilder = Widget.inherit({
if((e.type === "keydown" && e.keyCode === TAB_KEY)
|| (e.type === "keyup" && (e.keyCode === ESCAPE_KEY || e.keyCode === ENTER_KEY))) {
info.component.hide();
- eventsEngine.trigger(options.menu.target, "focus");
+ eventsEngine.trigger(options.menu.position.of, "focus");
}
});
@@ -1060,7 +1059,6 @@ var FilterBuilder = Widget.inherit({
$popup = $("
")
.addClass(options.menu.cssClass).appendTo($container);
this._createComponent($popup, Popup, {
- target: options.menu.target,
onHiding: options.menu.onHiding,
onHidden: options.menu.onHidden,
rtlEnabled: options.menu.rtlEnabled,
diff --git a/testing/tests/DevExpress.ui.widgets/filterBuilderParts/commonTests.js b/testing/tests/DevExpress.ui.widgets/filterBuilderParts/commonTests.js
index 5265274a82af..a4ae1564c5c5 100644
--- a/testing/tests/DevExpress.ui.widgets/filterBuilderParts/commonTests.js
+++ b/testing/tests/DevExpress.ui.widgets/filterBuilderParts/commonTests.js
@@ -463,6 +463,26 @@ QUnit.module("Rendering", function() {
//assert
assert.equal($container.find(".dx-texteditor-input").val(), "3.14 kg", 'numberbox formatted value');
});
+
+ //T603217
+ QUnit.test("Menu popup hasn't target", function(assert) {
+ // arrange
+ var $container = $("#container");
+
+ $container.dxFilterBuilder({
+ value: ["Weight", "=", 3.14],
+ fields: [{
+ dataField: "Weight",
+ dataType: 'number'
+ }]
+ });
+
+ // act
+ $("." + FILTER_BUILDER_GROUP_OPERATION_CLASS).trigger("dxclick");
+
+ // assert
+ assert.notOk($container.find(".dx-filterbuilder-overlay").dxPopup("instance").option("target"), "popup target shoud not be set");
+ });
});
QUnit.module("Filter value", function() {