2017-01-23 77 views
0

使用openui5 1.42.7版时,鼠标滚轮悬停在TreeTable区域时什么也不做,页面也不滚动。将鼠标悬停在TreeTable上不滚动页面

在以前的版本1.32.9中,此行为完美运行。

这是我们页面的基本结构。

<Page id="page" navButtonPress="onNavBack" showNavButton="false" title=" 
    {i18n>pageTitle}" busy="{detailView>/busy}" enableScrolling="true"     
    busyIndicatorDelay="{detailView>/delay}"> 
    <content> 
    <Panel id ="panel" expandable="false" expanded="false" width="auto" visible="true" 
     class="sectionHeaderbackground"> 
     <IconTabBar id="iconTabBar" class="sapUiResponsiveContentPadding backgroundFormArea" 
     height="20px" visible="true" select="onSelectChanged" headerMode="Inline" 
     expandable="false"> 
      <items> 
      <IconTabFiter> 
       <l:Grid defaultSpan="L8 M8 S8"> 
       <l:content> 
        <TreeTable id="TreeTableBasic" select="onSelectNodes" rows="{path:'/hierarchy', 
         parameters: {arrayNames:['children']}}" selectionMode="None"enableSelectAll="true" 
         selected="true" ariaLabelledBy="title" visibleRowCountMode="Fixed"> 
         <t:toolbar> 
      <Toolbar> 
       <Title id="title" text="" /> 
       <ToolbarSpacer /> 
       <Button text="{i18n>collapseButton}" press="onCollapseAll" type="Emphasized" 
        icon="sap-icon://collapse" class="buttonColour"/> 
       <Button text="{i18n>expandallButton}" press="onExpandAll" type="Emphasized" 
        icon="sap-icon://expand" class="buttonColour"/> 
      </Toolbar> 
      </t:toolbar> 
      <t:columns> 
      <t:Column width="13rem"> 
       <Label text="{i18n>locationTreeTable}" design="Bold"/> 
       <t:template> 
        <HBox> 
        <CheckBox selected="{checkValue}" select="locationCheck"></CheckBox> 
        <core:Icon src="sap-icon://group" visible="{= !!${name}}" 
         class="paddingClass" /> 
        <Link text="{name}" emphasized="{= !!${locationGroupGUID}}"></Link> 
        </HBox> 
        </t:template> 
      </t:Column> 
      </t:columns> 
     </t:TreeTable> 
     </l:content> 
    </l:Grid> 
    </IconTabFilter> 
</items> 
</IconTabBar> 
</Panel> 
</content> 
</Page> 

还有一些其他的标签我消除了简洁,但它们只是没有滚动发行的页面不相关的部分。

当我使用的开发工具和删除HTML中的highlighted div悬停在treetable中

时,我不是很熟悉openUI5滚动运作。实际上这个代码是由一位顾问开发的。他们说这是一个框架问题,他们无能为力。

我怀疑这是一个需要在openui5 github存储库上报告的错误,但是我想在提交错误之前先检查一下这个错误,以防在实现这个错误时出现明显错误。

任何意见,将不胜感激。谢谢!

回答

0

我能够通过在css文件中重新定义一些CSS类来找到解决方法。通过在sapUiTableCtrlScr类中添加属性pointer-events:none,我可以在表格上滚动。

.sapUiTableTreeIcon { 
    display: none; 
    width: 25px; 
    padding: 0; 
    flex-shrink: 0; 
    margin-right: 6px; 
    pointer-events: auto; 
} 

值none将鼠标事件发送到具有此值的目标元素后面的元素。这样做可能是复选框和折叠和展开按钮不起作用,所以我不得不在sapUiTableTreeIcon和sapMCb类中添加pointer-events:auto。

.sapUiTableTreeIcon { 
    display: none; 
    width: 25px; 
    padding: 0; 
    flex-shrink: 0; 
    margin-right: 6px; 
    pointer-events: auto; 
} 

.sapMCb { 
    box-sizing: border-box; 
    height: 3rem; 
    line-height: 3rem; 
    vertical-align: top; 
    text-align: left; 
    padding: 0 0 0 3rem; 
    pointer-events: auto; 
}