tabris-js icon indicating copy to clipboard operation
tabris-js copied to clipboard

App freezes when the popover is shown and the anchor of the popover is Action

Open ahmadov opened this issue 4 years ago • 1 comments

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>
);

ahmadov avatar Mar 17 '21 16:03 ahmadov

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>
  );
}

tbuschto avatar Apr 14 '21 12:04 tbuschto