Nativescript-vue native iOS Navigation button disappears after setting title on ActionBar - ios

When I use just plain ActionBar:
<ActionBar/>
when I changing route with:
this.$navigateTo(Catalog)
the native ios Back button appears normally,
but when I change action-bar like this:
<ActionBar title="some title"/>
or put other elements inside action-bar like this:
<ActionBar>
<NavigationButton text="Go back" android.systemIcon="ic_menu_back" #tap="goBack" />
<ActionBar/>
the default native ios Back button disappearing.
What I need in the end is default ios action-bar with custom title and native ios back button that appears when I navigate between components. Please help, thanks in advance!

Solved my problem. I was using ActionBar in my main component(where tabs where defined). Instead, I removed it from my main component and added its own ActionBar for every component. That solved the problem. Now the default ios back-button displaying properly with any other combinations of params or nested elements and it doesn't matter wether you route to frame of same component or not.

I'm unable to reproduce the issue on my end, the NavigationButton is still visible when I use the exact code snippet above, tested with iOS v12.1.4. Please share the Playground sample if you still have the issue on your end.
However, you will not be able to modify the tap handler on iOS as mentioned in the docs.
In iOS, the back button is used explicitly for navigation. It
navigates to the previous page and you cannot handle the tap event to
override this behavior.
If you want to place a button on the left side of the ActionBar and
handle the tap event (e.g., show slide-out), you can use ActionItem
with ios.position="left".

Related

Issue with openning PDF in iOS 11.3 Using PWA

I've used Vuejs and Framework7 in my PWA. I want to open a remote PDF file in my PWA and also it's important to me that users be able to back to my PWA after opening PDF. I did this using :
window.open(pdf_url, "_blank");
And it works fine for iOS > 12 and after opening pdf file there is an "OK" button for closing pdf.
But for example in iOS 11.3 there is no button and user has to use home button to close PWA.
I tried to solve problem using iframe but I can show only first page of the pdf.
Is there any way to fix this issue?
You can resolve this issue by doing some tricks (for any device without back button):
if you use iframe, you can set height manualy with overflow scroll, and I think this will resolve issue (dependence of style or lib dependency, so that may be not work).
you can add back button to your navbar, or Toolbar to let user click on it to back to previous page. (I prefer this solution).
you can render pdf in popup nested of normal html page, and then you can customize popup component by handling back button, or handling close by dropback overlay.
I use second and third point in real project and its work fine...
This is sample close button code used in popup:
'<p>'+ i18nextHelper.i18next.t('Exit From PDF') +'</p>'
Note: You can also customize height page for pdf page only, and add normal button bellow it, or by add absolute positioning button above PDF, but I think if you use second or third point will be best.
Good luck.

iOS keypad not getting hidden after upgrade to iOS 10 in angular js

I have recently updated device to iOS 10 and facing issues with hiding iOS keypad when i switch from one view to another.It was working well with iOS 9.3.
Programmatically what i have done is, i was intercepting some element and auto focusing one input box when i navigate to second view. And when i move back to first view it was getting hidden but now with 10.0 it doesn't hide it automatically.
Because of privacy concern i am not able to post my code here but this is an angular code where i have written a directive which intercepts clicks on input box in the second view and auto focuses the same which in turn makes keypad popping up.
Now my requirement is to hide this keypad when i move back to first view.
As iOS 10 is very recently released any help or suggestion on this will be greatly appreciated.
N.B: Everything works well with iOS 8 and 9.
Here is what i have tried:
Tried hiding active DOM element.
document.activeElement.blur();
Also tried calling blur using target property of $element by passing that to my link function in the directive.
It looks like this is a bug in safari. I had the same issue today and was able to reproduce it with this fiddle:
https://jsfiddle.net/Lz652478/6/
It looks like if an input is removed from the dom via a touch event, the keyboard will become sticky. I've been able to get around it in my app by manually calling blur at the start of my event handler, before the route changes and the input is removed from the dom.

Firemonkey embedded ios web browser displays "done" bar issue

I have an interesting issue with an IOS app, 32bit at present.
I have a simple project with one form, a button and a TWebBrowser component.The "onclick" of the button sets the align property of the twebbrowser to client and opens a webpage (www.trademe.co.nz for testing).
Every thing works ok until I go to use the virtual keyboard (e.g. enter a search). When the virtual keyboard appears I am getting a second "done" button bar appearing above (and behind?) the main one. The main "done" bar includes next and previous buttons, whereas the background one doesn't. It appears that there are two keyboards appearing. I have the issue on both my test phones, one running IOS7 and the other running IOS6 and I believe it is also happening under IOS8.
Does anyone have any idea what causes this?
TIA

Button Highlighting and Scroll Issue in Phonegap

I am New to Phonegap Development, I am Using jQuery mobile to create my UI. I have two Issues here,
Response of button for touch event is very slow. Why..?
I have Created a form with some elements like 2 Inputs text type, 2 Button one after another.
M problem is when I click on input, the keyboard popup makes the page move up, that's OK but when I press the keyboard resign button, the page stay little up.
Can you please help me out..!
and how to Optimize the responsiveness of JQuery mobile UI. I have completely avoided the images.
First, you can follow this link to remove the delay (300ms) from the click event.
And for the second one, i hope you are facing this issue for android. if so, then you need some changes to be done on the AndroidManifest.xml
Use below android property in application tag,
android:hardwareAccelerated="false"
android:windowSoftInputMode="adjustPan"
Will look something like
<application android:icon="#drawable/icon" android:label="#string/app_name"
android:hardwareAccelerated="false"
android:windowSoftInputMode="adjustPan">
This should resolve your issue.

How to navigate BlackBerry BrowserField2 in OS5

I am using the new BrowserField2 in BlackBerry OS5 to display HTML content in my app. There are 3 options available for navigation through links in that content.
CURSOR navigation uses a block cursor and actually moves through the characters of the page. Not very useful for me.
POINTER navigation uses a mouse like pointer that you move around the screen and hover over elements. This could work but there is a bug however in that the browser field captures navigation and never lets go so this mode is effectively broken if you share a screen with any other managers. Once your focus enters the browser field you cannot move focus back out and into neighboring fields. RIM has acknowledged the bug but has no work around.
NONE which is for custom navigation but they offer no explanation as to how you would do this.
What I ideally want is to simply have trackpad movements move the focus through the links and highlight them. Then a click would activate the link. I assume I would select the NONE option above and implement my own focus navigation but I am not clear how this can be accomplished with the new APIs.
Is anyone familiar with the new browser2 component could give some guidance?
Thanks!
There's a workaroudn to getting back the focus out of the BrowserField using the NAVIGATION_POINTER.
I found it in this thread:
http://supportforums.blackberry.com/t5/Java-Development/BrowserField-2-Navigation-Mode/td-p/632172
"farahh" posted this:
I found out a hack..
with the navigation set to pointer mode, a click outside the browserfield manager invokes Manager.invokeAction(int). I used the getFieldWithFocus to verify which field has focus and then switch the focus to something else.
Cheers.
Nahuel
PD: i havent found out how to get the behaviour you want, i need that as well so if you got it working please let me know, its kinda urgent in my project =(
I actually reverted back to the older browser1 (OS4) component because the navigation problems in browserField2 (OS5) were a deal breaker for me. Luckily the OS4 browser does everything I need in terms of functionality and it has the exact navigation behavior I need and there are no focus problems mixing it with other views.

Resources