question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Not showing in tooltip mode with new Rect source

See original GitHub issue

On 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.10
  • react-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:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ChaossAdept7commented, Jul 30, 2020

I would recommend @jeswcollins solution, Tooltip mode really wasn’t designed to work without an anchor element. I’ll leave this open until I fix the documentation to make this more clear. @ChaossAdept7 does that work for you or can you explain what you are trying to achieve?

I tried other approach

1reaction
SteffeyDevcommented, Jul 28, 2020

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Inspect hovered element in Chrome? - Stack Overflow
Select the Sources tab in the DevTools window. Using the mouse, hover over the element you want to inspect, to make the tooltip...
Read more >
Scripting API: GUI.tooltip - Unity - Manual
Display the tooltip from the element that has mouseover or keyboard focus GUI.Label(new Rect(10, ... Button(new Rect(10, 55, 100, 20), "No tooltip here");...
Read more >
Building a tooltip component - web.dev
A tooltip is shown working across a variety of examples and color schemes ... Tooltips are not replacements for labels or other high...
Read more >
Custom Tooltip Not Working - SciChart
Hi, Custom tooltip is not working on v2.0.2179. ... renderableSeries.add( new FastLineRenderableSeries(wasmContext, { dataSeries: xyData }) ); const ...
Read more >
ToolTip.cs - Reference Source
ToolTip "]/*' /> /// <devdoc> /// <para> /// Initializes a new instance of the <see cref='System.Windows.Forms.ToolTip'/> class, given the container.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found