How to conditionally render an input accessory view? - react-native

I am trying to conditionally render an input bar that appears above the keyboard when the user is tying. I do not want to show this input bar unless the user wants to add something. So they tap a button which is supposed to make the component visible and then focus on the input which brings up the keyboard.
This works as expected except when the user first opens the keyboard. Nothing appears. There is an empty view tag as the keyboard comes up but then it disappears and there is nothing. However, once the user starts typing it appears and after that works as expected. I have no idea why it isn’t appearing. If I don’t type anything and dismiss the keyboard you can see it briefly before it goes away as it is supposed to.
I have tried calling the function with async-await and my current syntax. Neither is working and I have been unable to solve this.
Here is a snack that recreates the issue and contains all the relevant code to reproduce the error.
https://snack.expo.io/#dmargulies/inputaccessoryview-problem
Thank you for your help.

First of all InputAccessoryView exists only on IOS.
I changed conditional rendering flow.
Look at: https://snack.expo.io/#djalik/inputaccessoryview-problem

For anyone looking for a cross-platform solution, there is a package:
react-native-keyboard-accessory
Note: I'm not the author, just figured it might help some peeps.

Related

IntelliJ: How do I move the position of the method parameter popup hint?

When I'm working in IntelliJ, I often get this popup window that helps to see what method signatures I can use.
It's helpful sometimes, so I don't want to disable it, but in certain situations like this, it blocks my view and I don't know what I'm doing. Is there a way to move the position of this pop-up to under the code being typed instead of above? Basically, I'd still like the pop-up, but I'd like to see the code above it.

Hover in Selenium does not work

This is not really question, but just sharing my experience.
I am testing a page containing charts. Whenever a hover action by mouse is done, it shows small hint next to it. This work perfectly interacting with the element manually. The problem happens when trying to hover over element from Selenium.
I tested it with the following code, but it did not work
new Actions(getDriver()).moveToElement(graphElement).build().perform();
It only works if the folowing code is executed prior to using Actions
graphElement.click();
Even though the Actions click() method does not work. It really needs to be clicked through WebElement.click() and then use Actions...
Does anyone have similar experience with this behaviour? Why does the element should be clicked on before the Actions can work?
Because it is in contrary with the flow. Why anyone would start with clicking on the element to check that some message is displayed on hover action?
JS workaround (hover) does not help as well.
Thanks for your posts.
I just searched and found very neat solution.
Using the following code solved that problem with focus.
graphElement.sendKeys("");
so the final version
graphElement.sendKeys("");
new Actions(getDriver()).moveToElement(graphElement).build().perform();

Cannot type into text input on jqModal dialog when modal set to true

Having upgraded jqModal from r13 to r22, I find that where my dialogs contain text inputs it is not possible to type into them. Removing modal:true from the settings fixes it, but I don't want my users to be able to dismiss the dialog by clicking on the overlay. Is this behaviour by design, or is it a bug?
This is certainly not by design. I have released a fix (+r23). Please open a github issue if you require further assistance.
Related:
If you're nesting modals, be sure to have a higher z-index value on child modals.
You may override the $.jqm.focusFunc() to provide custom behaviour for events occurring outside the currently active modal.

How to fix a non responding ext.list?

I've got a problem with an Ext.List:
You press a button on the main menu and are shown the list. Everything on it works fine and it let's you choose, where to go deeper inside the app. No problems so far.
But if you then go back to the main menu by pressing a "back"-button and reenter the page, that shows this Ext.List, it doesn't work anymore: you can't select an entry of the list.
The "back"-button removes the list, if you return to the main menu this way:
setTimeout(function(){page.removeAll();},100);
What's my mistake? Do you know a better method than "page.removeAll()" that really kills this Ext.List to let it then be completely recreated when I choose to see it in my main menu?
Thanks in advance, you guys have the best tips and tricks.
It's hard to tell without seeing your code but I suspect that there is a javascript error somewhere in the program flow that you described. If you display the javascript console in either Chrome or Firefox it should show the error.
Depending upon how the function that creates the list is defined it would normally recreate the list upon page/function entry and there should be no need to 'kill' the list explicitly.

How to disable autocompleet intellisence when pressing spacebar in vb.net

While creating test in vb.net i found it pretty annoying when you start typing and autocompleet changes a class to something similar looking even it is a class you don't want.
Image to illustrate :
In the picture you can see I am trying to setup a controller (this controller does not exist at the moment) so when i press the spacebar i will get DienstControllerFacts.
How do you disable this sort of auto-correction?
I can't see your image, but I think this gives you some keyboard shortcuts for dealing with your issue, and this shows you how to modify the settings.
Did you tried to selecting Common tab instead of All tab in the intellisense window?