$('.sceneThumb').draggable({
drag: function(event, ui) {
}
});
A simple draggable event like this is not recognised by chrome after chrome updates (current v90). I have tested on chrome v87 and firefox, they all works fine. I have seen posts about removing adBlock extension in chrome, I tried that and no effect too. Anyone can helps me?
Related
ThereĀ“s a question asking for the same, but it doesn't have a satisfactory answer as I already tried it.
This is my code:
$(window).on("focus", function() {
doSomeFunction();
alert("I am here!");
});
I'm using window because document wasn't working even on chrome desktop, someone suggested using window here in stackoverflow and it works on desktop at least, but in chrome mobile is another case.
With firefox mobile I can switch tabs, press home and reopen firefox, press home, swipe close and reopen firefox and I get the alert message, with chrome none of those cases work.
Need to find a way to make it work on that browser, remember, it works on chrome and firefox desktop and firefox mobile but not on chrome mobile.
Thanks in advance
Got a solution, it's probably not the best but it works.
Aparently chrome mobile is not catching this event when is placed on .js files
so I just have to place it on a tag in my html document:
<script>
$(window).on("focus", function() {
doSomeFunction();
alert("I am here!");
});
</script>
In this case, it doesn't matter if doSomeFunction() is in the DOM or in a .js file, just make sure the focus event is in the DOM
I'm using Jquery 3.1.1. My code works fine on desktop and Chrome Android, but doesn't work at Firefox Android.
$('.menu').on('click', function() {
$('.aside').addClass('slide-in');
});
Making 'click touchstart' doesn't help, even causes more problems as on Crhome it makes two "touches" instead of one
Im having some issues presenting a modal on Safari. This currently works in Chrome:
var screenShotDialog = document.createElement("DIALOG");
document.getElementsByTagName("BODY")[0].appendChild(screenShotDialog);
screenShotDialog.showModal();
however, when i try to run this same server on Safari, this showModal() method is appending this dialog to the bottom of my page, while in Chrome it shows it as a "popup". Checking the console logs, im getting
screenShotDialog.showModal is not a function. (In
'screenShotDialog.showModal()', 'screenShotDialog.showModal' is
undefined)
I dont get this error in chrome, looking at the dialog documentation here http://www.w3schools.com/jsref/met_dialog_showmodal.asp I see that this should be supported for Safari ( i have Safari Version 9.0.3 ). Can anyone help this is pretty frustrating.
I'm trying to detect hashchanged which works fine in every browser except chrome. For example, with this code:
if ("onhashchange" in window) {
alert("The browser supports the hashchange event!");
}
The statement is never executed in Chrome but works in Firefox. I've seen a jQuery hashchange plugin on GitHub but didn't have any luck with that either.
Any ideas?
I've got some problems with events in Angularjs. So I have an event in SomeCtrl implemented like this.
$scope.$on('event', function () {
// some logic
}
When I'm debugging in Chrome and Firefox, then debugger stops on breakpoints inside $on. But on IE, it doesn't. Someone knows, what can be, a solution to this?
EDIT:
I execute function like this where I want to fire event:
function doBroadcast(eventName, data) {
$rootScope.$broadcast(eventName, data);
}
Eventname is good, I checked it with debugger. I'm using IE11 and when I'm checking on IE9 with compability mode, then event is firing. But on IE10 and IE11 don't. My Angularjs ver. is 1.0.8.