[DE] Forms: fix alignment for mask combobox

This commit is contained in:
Julia Radzhabova 2022-12-01 21:02:37 +03:00
parent 53e66de963
commit abba157cbf
2 changed files with 6 additions and 2 deletions

View file

@ -311,7 +311,10 @@ define([
var $list = this.cmpEl.find('ul');
if ($list.hasClass('menu-absolute')) {
var offset = this.cmpEl.offset();
$list.css({left: offset.left, top: offset.top + this.cmpEl.outerHeight() + 2});
var left = offset.left;
if (left + $list.outerWidth()>Common.Utils.innerWidth())
left += (this.cmpEl.outerWidth() - $list.outerWidth());
$list.css({left: left, top: offset.top + this.cmpEl.outerHeight() + 2});
} else if ($list.hasClass('menu-aligned')) {
var offset = this.cmpEl.offset();
$list.toggleClass('show-top', offset.top + this.cmpEl.outerHeight() + $list.outerHeight() > Common.Utils.innerHeight());

View file

@ -589,7 +589,8 @@ define([
this.cmbMask = new Common.UI.ComboBoxCustom({
el: $markup.findById('#form-txt-mask'),
cls: 'input-group-nr',
menuStyle: 'min-width: 100%;',
menuCls: 'menu-absolute',
menuStyle: 'min-width: 195px;',
editable: true,
data: [
{ displayValue: this.textPhone1, value: '(999)999-9999' },