Not showing in tooltip mode with new Rect source
See original GitHub issueOn iOS popover with “mode= {PopoverMode.TOOLTIP}” and “from= {New Rect(0, 0, 100, 100)}” (or without “from” at all) is not shown Removing “from” option should place tooltip in the center, but it also is not shown. Removing “mode= {PopoverMode.TOOLTIP}” helps, but that is not what i want to achieve.
My code is next:
<Popover
isVisible={this.state.provisionHintIsShowing}
arrowStyle={{
backgroundColor: 'green'
}}
mode={PopoverMode.TOOLTIP}
debug
>
<Text>Is Showing</Text>
</Popover>
Device/Setup Info:
- Device: Iphone XR
- OS: iOS 13.5
react-native
version: 0.59.10react-native-popover-view
version: 3.0.3
Debug Output [2020-07-06T11:24:54.820Z] setDefaultDisplayArea - newDisplayArea: {“x”:10,“y”:54,“width”:355,“height”:2250} Popover.js:498 [2020-07-06T11:24:57.008Z] measureContent - new requestedContentSize: {“y”:0,“width”:92,“height”:23,“x”:0} (used to be null) Popover.js:498 [2020-07-06T11:24:57.011Z] handleChange - waiting 100ms to accumulate all changes Popover.js:339 [2020-07-06T11:24:57.016Z] setDefaultDisplayArea - displayAreaOffset: {“x”:0,“y”:-1536} Popover.js:498 [2020-07-06T11:24:57.019Z] handleChange - waiting 100ms to accumulate all changes Popover.js:339 [2020-07-06T11:24:57.092Z] setDefaultDisplayArea - newDisplayArea: {“x”:10,“y”:10,“width”:355,“height”:2294} Popover.js:339 [2020-07-06T11:24:57.190Z] setDefaultDisplayArea - displayAreaOffset: {“x”:0,“y”:-1536} Popover.js:498 [2020-07-06T11:24:57.192Z] handleChange - waiting 100ms to accumulate all changes Popover.js:498 [2020-07-06T11:24:57.348Z] handleChange - requestedContentSize: {“y”:0,“width”:92,“height”:23,“x”:0} Popover.js:498 [2020-07-06T11:24:57.348Z] handleChange - displayArea: {“x”:10,“y”:10,“width”:355,“height”:2294} Popover.js:498 [2020-07-06T11:24:57.348Z] handleChange - fromRect Popover.js:498 [2020-07-06T11:24:57.348Z] handleChange - placement: “auto” Popover.js:498 [2020-07-06T11:24:57.349Z] computeGeometry - showing centered on screen Popover.js:498 [2020-07-06T11:24:57.349Z] computeGeometry - final chosen geometry: {“popoverOrigin”:{“x”:141.5,“y”:1145.5},“anchorPoint”:{“x”:187.5,“y”:1157},“placement”:“center”,“forcedContentSize”:{“width”:355,“height”:2294},“viewLargerThanDisplayArea”:{“width”:false,“height”:false}} Popover.js:498 [2020-07-06T11:24:57.351Z] handleChange - animating in Popover.js:498 [2020-07-06T11:24:57.352Z] getTranslateOrigin - popoverOrigin: {“x”:141.5,“y”:1145.5} Popover.js:498 [2020-07-06T11:24:57.353Z] getTranslateOrigin - popoverSize: {“width”:92,“height”:23} Popover.js:498 [2020-07-06T11:24:57.353Z] getTranslateOrigin - anchorPoint: {“x”:187.5,“y”:1157} Popover.js:498 [2020-07-06T11:24:57.353Z] getTranslateOrigin - shift: {“hoizontal”:0,“vertical”:0} Popover.js:339 [2020-07-06T11:24:57.745Z] Setting up keyboard listeners Popover.js:498 [2020-07-06T11:24:58.101Z] animateIn - onOpenComplete - Calculated Popover Rect: {“x”:141.5,“y”:-390.5,“width”:92,“height”:23}
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top GitHub Comments
I tried other approach
Ah, I suppose tooltip mode is needed if you want touches to fall through to the background. @ChaossAdept7 you can see the reason it is not showing from the log:
Calculated Popover Rect: {"x":141.5,"y":-390.5,"width":92,"height":23}
. Your popover is being rendered, but it is being rendered off the screen. Rending a tooltip is tricky, you have to position the Tooltip at the right point in the DOM for it to show correctly above other views. Make sure that the parent component of the Popover component fills the entire screen, or at least enough of the screen. Also, try to put the Popover component outside any scroll components. If you provide more of your code, I could try and help.