cancel
Showing results for 
Search instead for 
Did you mean: 

app closes on sap.m.Link press

chlippold
Explorer

Hi,

we have some sap.m.Links in ColumnListItems. Clicking the Links opens ResponsivePopover.

Currently we are using SAPUI5 1.96.12 - everything works as expected.

We are aiming to switch to 1.108.20 so i tested the behavior with this version. Clicking the link closes the app now. The Hash is changed immediately so i end up in launchpad menu. (i commented out the code of the event handler. the issue still exists.)

the issue occurs only in launchpad environment (standalone app works fine) and it seems to occur only using chrome dev tools' emulator. (no issue if dev tools deactivated). unfortunately i cannot simply test this with a real ipad.

I tested the same with ui5 version 1.116.0 and the links are working again as expected.

So I guess there is a "bug" in this specific version (1.108.20) or at least an issue between ui5 and chrome's emulator, isn't it?

<mvc:View controllerName="com.myorg.linkInTableIssue.controller.MainView"
xmlns:mvc="sap.ui.core.mvc" displayBlock="true"
xmlns="sap.m"
xmlns:f="sap.f">
<Page id="page" title="{i18n>title}">
<f:GridContainer id="cardGrid" busyIndicatorDelay="0" class="sapUiSmallMargin">
<f:layout>
<f:GridContainerSettings columnSize="20rem" rowSize="0.5rem" gap="0.5rem"/>
</f:layout>
<f:Card>
<f:content>
<HBox>
<Table id="dataTable">
<columns>
<Column hAlign="Center">
<Label design="Bold" wrapping="true" text="1st col" />
</Column>
<Column hAlign="Center">
<Label design="Bold" wrapping="true" text="2nd col" />
</Column>
<Column hAlign="Center">
<Label design="Bold" wrapping="true" text="3rd col" />
</Column>
</columns>
<items>
<ColumnListItem type="Inactive">
<Link text="press me 1" press=".onDataCellPress" />
<Link text="press me 2" press=".onDataCellPress" />
<Link text="press me 3" press=".onDataCellPress" />
</ColumnListItem>
</items>
</Table>
</HBox>
</f:content>
</f:Card>
</f:GridContainer>
</Page>
</mvc:View>

boghyon
Product and Topic Expert
Product and Topic Expert

What does the "onDataCellPress" handler exactly do? Could you share an mcve? E.g.:

  1. Click on "Fork" in https://plnkr.co/edit/16J1TFICxbqETCzaxuZ0
  2. Edit accordingly to create a minimal code that is sufficient to reproduce the issue
  3. Click on "Save"
  4. Share the new URL of the new plunk.
chlippold
Explorer
0 Kudos

https://plnkr.co/edit/jbExQCxkEsfx4c9I

i didn't get flp_index.html to open my app. but this is the basic example.

as i said, even with the event handler code commented out the app is being closed.

issue occurs only in launchpad environment with dev tools emulating an e.g. ipad.

0 Kudos

Try adding a breakpoint on uncaught exceptions when you click the link.

chlippold
Explorer
0 Kudos

already did this. there is no exception or anything. no errors in console. the hash is just being changed in this case. the hash is changed even before the breakpoint in the event handler hits.

Accepted Solutions (1)

Accepted Solutions (1)

boghyon
Product and Topic Expert
Product and Topic Expert

This is most likely fixed already with https://github.com/SAP/openui5/commit/5f7511d67413955324e7d3a28032097fb231fece. Open the browser's devtools and see if the respective code change is missing in the served sap.m.Link source code.

chlippold
Explorer

thanks a lot. that must have been the problem. with version 1.108.21 everything works again.

Answers (0)