tabris-js
tabris-js copied to clipboard
App freezes when the popover is shown and the anchor of the popover is Action
Problem description
App freezes when the popover is shown and its anchor is Action. When clicking the "open popover" action the popover is shown with its content but interaction with the app is not possible after that.
Expected behavior
The app does not freeze and interaction with the content of the popover is possible.
Environment
- Tabris.js version: 3.7.1
- Device: iPadPro 3rd gen
- OS: iOS 14.4
Code snippet
import {Action, NavigationView, contentView, device, Popover, Button} from 'tabris';
contentView.append(
<NavigationView stretch background='#e7e7e7'>
<Action title='open popover'
onSelect={({target}) => Popover.open(
<Popover anchor={target}>
<Button>click me</Button>
</Popover>
)}/>
</NavigationView>
);
Here is a revised snippet which closes the popover again. It works fine on Android, but iOS freezes as reported:
import {Action, NavigationView, contentView, Popover, Button} from 'tabris';
contentView.append(
<NavigationView stretch background='#e7e7e7'>
<Action title='open popover'
onSelect={({target}) => open(target)}/>
</NavigationView>
);
function open(target) {
const pop = Popover.open(
<Popover anchor={target}>
<Button onSelect={() => pop.close()}>click me</Button>
</Popover>
);
}