iOS copy code in clipboard not working on safari and iphone - javascript

Last couple of hours, i was trying to implement clipboard copy on iOS using different ways but no luck nothing is working on cross platform. I have tried different method using
zeorclipboard
clipboard and
jsfiddle
As the snap showing a code and a button below that, this is a webpage on safari browser on IPHONE and i just want to copy that code into clipboard when i press the copy code button and use that code on my APP page for verification but it is not working as i desired. With the fiddle code, when i click the button it focus on the code text-box but not select or copy that.
N.B: it is working on Firefox and chrome browser but i need it on iPhone safari browser except using flash. please help me out, i am badly need it

Related

How to enter keystrokes like ENTER,TAB, etc. in firefox browser using protractor framework?

I am trying to enter keystrokes(TAB) in my script.
I have used the following code:
browser.actions().sendKeys(protractor.Key.TAB).perform();
This is working in chrome but not working in firefox browser.
browser.actions().sendKeys(protractor.Key.TAB).sendKeys(protractor.Key.ENTER);
browser.actions().sendKeys(protractor.Key.TAB).sendKeys(protractor.Key.RETURN);
These 2 approaches are not even working in chrome also.
I need to run my script in firefox with entering keystrokes. Please help me...
Try to init some element on the page and send the key chord to it.
element(by.id('<visible element on the page>')).sendKeys(Key.chord(protractor.Key.TAB, protractor.Key.ENTER));
or try with browser actions:
browser.actions().sendKeys(Key.chord(protractor.Key.TAB, protractor.Key.ENTER));

Mapbox GL JS : Fullscreen and GPS button Issues in Chrome only

I am working on a weather visualization project using Mapbox (3 panes are locked together and one is for navigation, it's hard to explain until you see the link.)
Before I continue, I will post a link to the web app I am discussing here, so you can see it. My code is a MESS, and I am aware of that, but I believe this is a browser issue.
http://ability.a2hosted.com/main.html
In Edge and Firefox, the fullscreen and navigation buttons work fine. In Chrome, they do not work... the fullscreen button gets the browser stuck until you press escape (and doesn't render properly anyway!). And, in fact, chrome does not even display the navigation button at all.
Is there a way to get these buttons to show up and function as they do in firefox and edge? Or, maybe an alternate button? I am attaching a screenshot of how the page should look.
I should note, I can live without the fullscreen buttons, but I need the navigation button option to be working in chrome. This really is a must for my project, so even if there's another link or button I could place over it to activate it somehow, it's fine as long as it works. I am not good enough with JS to understand what may be causing this issue after 2 hours of research.
From https://www.mapbox.com/mapbox-gl-js/api/#geolocatecontrol:
Not all browsers support geolocation, and some users may disable the feature. Geolocation support for modern browsers including Chrome requires sites to be served over HTTPS. If geolocation support is not available, the GeolocateControl will not be visible.

Clipboard copy-paste in JavaScript doesn't work in Edge browser?

I am aware of the fact that Clipboard API is currently not supported by edge browser. I am using document.execCommand() to do copy & paste. The copy functionality works fine. But the paste doesn't work. I am using a custom context menu to achieve copy and paste. Previouly I made use of Clipboard API for the functions, it was working flawlessly until Edge came up. I heard Clipboard API will be added in next Edge release. I even checked Zero clipboard from GitHub. But didn't get an appropriate way to implement "Paste" functionality. I just want to know is there any alternate way to achieve the same or by using ZeroClipboard.

Window.print() and cloud printing

My application is developed in ASP.NET
In one of my pages(productinfo.aspx) I have a HTML button named & labelled
as print. I am handling the click of this button in java script like
below.
$('#print').click(function($)
{
window.print();
});
The above is working fine in all browsers on PC and in smartphones as well
except Google Nexus mobiles and tablets. It is working in other android
mobiles like Samsung and Sony experia etc..
I came to know that window.print is not supported in Google android and I
should use Google cloud print based on the following link.
https://developers.google.com/cloud-print/docs/gadget
But this requires the user to be logged into to GCP with their Google ID.
But my requirement is like the device will be not connected to Internet
and it should provide the print as dialog as like in other devices.
Note:
In Android chrome browsers there is a print command in the browsers menu
clicking on that is showing the print dialog without any GCP.
Is it possible to invoke the browsers menu command through java script,
I tired simulating (ctrl+p) key press event on the button click assuming
that it will trigger the browser's print command it too didn't work.
It would be very much helpful if any one can help me with a solution for
this issue.

HTML Rich Text Editor problems with justify* commands

I'm writing a simple Rich Text Editor which is currently working perfectly in Chrome and Firefox.
Internet Explorer however, is another story. I have finally managed to get most things working in IE with work-arounds and such, but all of my justify commands do nothing.
That is, this bit of code has no effect.
iframe.contentWindow.document.execCommand('justifyRight', false, null);
This is despite all other commands (ie: bold, italic, etc) working just fine.
Any clues as to why the justify* commands are different and not working?
I have a live demo available at http://www.hazaarmvc.com/site/test
Turns out that it was simply the content inside the editor window (an iFrame) that was the problem. It was originally generated using a Mozilla editor. Due to the differences in how each browser renders it's HTML content, IE just didn't know how to apply it's version of justifyleft, etc. Working on an empty editor everything just worked as expected.
See "Internet Explorer Differences" here: https://developer.mozilla.org/en/docs/Rich-Text_Editing_in_Mozilla for an explanation of what is different.
I'm going to chalk this one up to IE just being crap.

Categories