[SSE mobile] Correct dropdown list

This commit is contained in:
SergeyEzhin 2021-12-14 20:21:11 +04:00
parent ced7462a9d
commit bdd585b26e

View file

@ -42,7 +42,6 @@ class MainController extends Component {
super(props);
window.editorType = 'sse';
this.boxSdk = $$('#editor_sdk');
this.LoadingDocument = -256;
this.ApplyEditRights = -255;
this.InitApplication = -254;
@ -425,21 +424,22 @@ class MainController extends Component {
onEntriesListMenu(validation, textArr, addArr) {
const { t } = this.props;
const boxSdk = $$('#editor_sdk');
if (textArr && textArr.length) {
if(!Device.isPhone) {
this.dropdownListTarget = this.boxSdk.find('#dropdown-list-target');
let dropdownListTarget = boxSdk.find('#dropdown-list-target');
if (!this.dropdownListTarget.length) {
this.dropdownListTarget = $$('<div id="dropdown-list-target" style="position: absolute;"></div>');
this.boxSdk.append(this.dropdownListTarget);
if (!dropdownListTarget.length) {
dropdownListTarget = $$('<div id="dropdown-list-target" style="position: absolute;"></div>');
boxSdk.append(dropdownListTarget);
}
let coord = this.api.asc_getActiveCellCoord(),
offset = {left: 0, top: 0},
showPoint = [coord.asc_getX() + offset.left, (coord.asc_getY() < 0 ? 0 : coord.asc_getY()) + coord.asc_getHeight() + offset.top];
this.dropdownListTarget.css({left: `${showPoint[0]}px`, top: `${showPoint[1]}px`});
dropdownListTarget.css({left: `${showPoint[0]}px`, top: `${showPoint[1]}px`});
}
Common.Notifications.trigger('openDropdownList', addArr);