Browse Source

Merge branch 'fix/documenteditor_toolbar_scroll' into 'develop'

修改正文编辑器工具条显示问题

See merge request o2oa/o2oa!487
胡起 5 years ago
parent
commit
588b9b0e8c
1 changed files with 8 additions and 2 deletions
  1. 8 2
      o2web/source/x_component_process_Xform/Documenteditor.js

+ 8 - 2
o2web/source/x_component_process_Xform/Documenteditor.js

@@ -732,14 +732,20 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor =  new Cla
 
             //var pNode = this.toolNode.getOffsetParent();
 
+            var paddingTop = this.form.node.getStyle("padding-top");
+            try {
+                paddingTop = paddingTop.toInt();
+            }catch (e) {
+                paddingTop = 0;
+            }
 
-            if (p.y<0){
+            if (p.y<paddingTop){
                 this.toolbarNode.inject(this.scrollNode);
                 this.toolbarNode.setStyles({
                     "position": "absolute",
                     "width": ""+x+"px",
                     "z-index": 20000,
-                    "top": "0px",
+                    "top": paddingTop+"px",
                     "left": ""+p.x+"px"
                 });
             }else{