What might be preventing an iOS user from saving an image? - magnific-popup

I'm currently using a lightbox plugin called Simple Lightbox and I'm encountering some issues. Right click > save as is not disabled on Chrome, but pressing and holding an image in the lightbox does not result in the option to save it on iOS devices. I was wondering if there are any javascript or css properties that I could look for in the code that might be preventing this action from occuring.
simple lightbox: http://simplelightbox.com/
github link: https://github.com/andreknieriem/simplelightbox

Well, I finally found the answer right after posting! I'll leave it here in case anyone stumbles upon this later.
In //touchcontrols on simple-lightbox.js, I deleted the following:
> `swipeStart = 0,
swipeEnd = 0,
swipeYStart = 0,
swipeYEnd = 0,
mousedown = false,
I also disabled swiping to change photos. I hope this helps someone later on!

Related

Proper way to close dialogs in Flutter tests

Flutter's WidgetTester has a pageBack() method for popping the route stack. When I open a page as a fullscreen dialog using MaterialPageRoute's fullscreenDialog property, the pageBack() method does not work ("One back button expected on screen"). I can't find an alternative method for the job.
What is the standard way to cancel/close a dialog in a Flutter test?
I am able to close the dialog as follows:
await tester.tap(find.byIcon(Icons.close));
But then I could have instead done a pageBack() as follows:
await tester.tap(find.byIcon(Icons.arrow_back));
Why have the pageBack() method but no equivalent for closing a dialog?
I have not yet written my Cupertino UI yet. Will that test need to look for a different icon?
See also a similar problem I had with selecting the overflow menu.
UPDATE: Maybe pageBack() emulates pressing the system back button, not the back arrow? In that case, there would be no need to emulate the behavior on iOS, and I would have to find the back button by icon to emulate pressing it, anyway.
You can have a dialog that contains a button with a text 'X', which pops the dialog.
This button, you can find with
await tester.tap(find.text('X'));
and don't forget to pump to go through with the tap
await tester.pumpAndSettle();
Have a look at the full code sample the flutter team is using to test dialogs: source code
I think finding by Icons.close seems reasonable. I did similarly in my app. Another option could be assuming the x,y of the button in the navigation bar and just tapping at that location on the screen.
I faced a similar problem earlier and I found the following solution that worked fine for my case.
Navigator.of(context, rootNavigator: true).pop('dialog')
Or you can write like,
Navigator.of(context).pop();
Navigator.pop(context);
You can check the brief documentation on Flutter Navigation and Routing here.
Hope, this would work. Have a great day.

Can i get screenshot of desktop using vuejs

i am working on tracking app using vue.js. I am a new developer.i wanna know is it possible to track mouse click and capture screenshots even if person is on desktop or any where else on browser
This has nothing to do with VueJs specifically. However, you can use HTML5/Canvas/Javascript to take a screenshot, but that's still experimental.
Take a look at this answer: Using HTML5/Canvas/JavaScript to take in-browser screenshots
i have found the solution
i followed the steps here
https://www.webrtc-experiment.com/getScreenId/
these steps allowed me the screen sharing on my webpage and then i use html to canvas to get the image of the video tag

some url can not be open by react-native webview

i have a website, and i am sure i can open it in PC browser, or mobile browser, util i use React-Native Android Webview Component .
the WebView Component, i can use it open some url ,such as m.facebook.com, but could not open my website, do not know why, i have set some props of WebView ,such as automaticallyAdjustContentInsets ,javaScriptEnabled,domStorageEnabled,scalesPageToFit.
when i use the FB example UIExplorer, it good work for open m.facebook.com, but when i change the url to my website, could not open it.
anyone know how is it ?
And when i use WebView Component and get into trouble, how can i debug it?
yep, i know how is it,
the reason is my html page height is 0
when i find the answer of this question, another one meet the same question, he finally find the reason is his html page height is 0,
he can debug his app with chrome inspcet, but i can not.
so, the first thing i should do is try to debug my app, after a long time ,i dubug it successful and he is right ,the reason is no height for html body, and then it is easy to reslove like this,add this line of code to my html page when it is load:
$(html).height($(window).height())
but, after a second , i find it is invalid in some android phone, i will get:
$(window).height() == 0; // true
then, i change the line to:
if($(window).height()!==0) {
$(html).height($(window).height());
} else {
$(html).height(10000);
}
it is a fast way to fix it, and the page is correct.
in the end ,i am confuse of the height, i am sure the page can be open in mobile browser, why the height become 0 in react-native WebView?

Magnific Popup appears below page on mobile

I'm asking this question here because the Magnific Popup docs said this was the best place for questions.
I'm having an odd issue, on smaller windows and mobile the popup appears below the page and you have to scroll down to it. I haven't had this issue before and I was hoping someone else had.
You can check the demo site at http://seemywebsite.org/customreserves/
You have to use media queries and override the required classes, for the mobile versions.
Figured it out for anyone else who may have this problem. I'd applied padding to the popup, and that was breaking the layout, so adding box-sizing:border-box worked. Phew.

Mechanical Turk - can't view HIT, appears blank

I m trying to setup a few image categorization tasks on Mechanical Turk sandbox developer version. When I try to view the HIT(the annotation image), it appears blank. I clicked on the 'Accept HIT' button but I still couldn't see anything.
In order to make sure that nothing was wrong with my project setup in particular, I signed in as a worker to accept HITS on other projects involving image categorization. I still continue to see a blank image in their categorization projects, where the image to be annotated is supposed to be displayed.
Can anyone help with this problem?Thanks.
Problem solved - it was a simple browser incompatibility problem.
I know you have already answered this for yourself, however for other requesters out there I think this may be useful.
I was developing HITs and I too was having issues view the HIT in Sandbox in Chrome and Firefox, I realized that it had something to do with the script being blocked by the browser and the way to fix this was to "unblock the content" - usually a shield icon in the URL bar.
When further developing my HIT I added information about how to see the HIT in the description box of the HIT so turkers could read the instructions and then work on the HIT - to be absolutely clear to the turkers, I added a "(READ DESCRIPTION)" in the title so turkers would know where to look.
Hope this helps!