Hi Im developing an application where firefox needs to be kiosk mode on browser start. I got it working on all platforms except mac 10.10 ?
Im compiling mozilla source with "fullscreen" in browser.xul and rkiosk addon and
Using obective-c code to hide dock and top menubar and then start firefox.. Works like charm in all macs but 10.10. In 10.10 it leaves the dockarea and top menu area uncovered.
Any ideas where i can tweak the mozilla source ?
Where does mozilla calculate height and width when it starts ?
Can I tweak the fullscreen api to allow fullscreen from js code rather than on user click ? document.documentElement.mozRequestFullScreen -- this doesnt work unless a user initiates an event.
Related
I have implemented reading the touch force for haptic touchscreen as per https://developer.mozilla.org/en-US/docs/Web/API/Touch/force
If I test in chrome debug tools on a PC (set to mobile) then it will register the force as 1 (as far as I can tell there's no way to simulate a different pressure). So I know the code it correct.
However on my iPhone XR which does have a haptic screen it always registers as 0.
The compatibility table says Safari on iOS support it, and I haven't been able to find anything that says you need to request the user permission for the feature (like you would with device orientation).
Any ideas why it isn't working?
on caniuse you have more details on support for iOs Safari, please check your safari iOs version is >= 14.5.
Recently, I add google one-tap to our web. it works fine on chrome of Android, chrome, and firefox of IOS. But it displays on the right corner on the firefox of Android instead of on the bottom. Obviously, google one-tap library can't detect the browser is on mobile. Is there any solution to fix this?
This should be already fixed on Google side. Please verify.
I have an application which is running on Safari in IPad(IOS 7) . When i click on one of the button it is showing some JS error. Where exactly i need to into for the script error console? I don't see any error console in safari when it is running on IPad.
Get a Mac computer
Open Safari on Mac
Enable the Develop menu https://developer.apple.com/library/mac/documentation/AppleApplications/Conceptual/Safari_Developer_Guide/GettingStarted/GettingStarted.html
Using a cable, connect your iPad to the Mac
On the iPad enable Web Inspector. Settings > Safari > Advanced (scroll down to the bottom to see it) > Web Inspector (set to On)
On the iPad open the Web application
On the Mac open the Develop menu. When it drops down, you will see your iPad shown in the menu as a separate menu item. That menu item should have a submenu showing Web pages/applications currently opened on your iPad. Choose your Web application.
You get your application in the Development Console, so do whatever you can (Safari Development tools are pretty weird, but, still, better something than nothing :) )
Actually you can see the console on Mac's Safari when your iPad is connected to it.
Today I discovered that I can make a page like a native app with shortcut on the homescreen, opens almost full screen ... I did a test and it worked, now I need to make it work 100% fullscreen, hiding the top bar and down on Android 4.3 and 4.4, is it possible?
https://developers.google.com/chrome/mobile/docs/installtohomescreen
Android 4.3 and 4.4 come with Chrome for Android by default, so Yes.
If you are asking if you can do this with the Stock Android browser which is on non-Google Android phones and phones that have upgraded from an earlier Android version, the answer is no not quite.
Android Browser does allow you to window.scrollTo(0,1) which will hide the navigation bar (but it will be visible if the user scrolls)
I am seeing problem happen only on iOS 6 but working fine on below iOS 6 version.
My app is loading image from a link which need to enlarge its image pixels to populate within size of UIWebView by using Javascript. The link image is originally in pixels 140x24.
I see it is running over the line, but the image not being scaled up using iOS 6 simulator. It does work in iOS 5 simulator. Please help.
(void)webViewDidFinishLoad:(UIWebView *)webView {
[webView stringByEvaluatingJavaScriptFromString:#"document.getElementsByTagName(\"img\")(0).height=\"30\";document.getElementsByTagName(\"img\")(0).width=\"280\";"];
}
The syntax in javascript to get the n-th element of an array is using square braces, not parentheses. So use document.getElementsByTagName("img")[0] not document.getElementsByTagName("img")(0).
Not sure why it was working in iOS5, WebKit is probably more strict in iOS6…
Additional tip: to debug javascript errors on iOS6, a new feature makes it very simple:
Go to the "Settings" application in your iPhone, enter the "Safari" settings and tap on "Advanced" at the bottom, then enable the "WebKit Inspector" from there
Display your page to be debugged on the screen (i.e. launch your app and go to your screen that contains the WebView to make it visible)
Plug your iPhone to your Mac via your USB cable
Open Safari.app on your Mac, go to the "Development" menu (1), select the menu item with the name of your iPhone and select your application in the submenu.
You will then be able to debug your web page presented in your iPhone using the powerful Web Inspector from your Mac, and can look into the javascript console, the DOM tree, etc.
(1) If you don't have the "Development" menu in Safari on your Mac, you can enable it in the "Advanced" preferences tab of the Safari application.