I have created one page, in which on right clicking on some button a modal appears.
When I right click on the modal it doesn't seem to work.
So far, what I got to know is, the mouse click is taken by the UI control which comes underneath that modal and listening to all mouse events and that UI control VNC.
I can click on the part of the modal, which is not above that control.
Is there any way I can force modal to take all mouse events when in focus?
What I want to do is just right click and copy the text from that modal.
Thanks in advance,
Regards,
Ganesh
Just called RFB's _rfb.get_keyboard().ungrab() method when modal is shown and was pretty done.
Related
I am facing a strange problem on iOS devices.
When clicking on buttons/links in an overlaying container, the element below fires also a click event. I have a "filter" button that opens an overlaying div with all the filter options. The closing button on the overlay is located directly over the button, that triggers the overlay. When I click on the close button, the overlay closes, and with a small delay, a click on the filter button is executed again and opens the overlay.
This also happend when I build my mobile menu, where I had a burger button on the top right which opens my mobile menu. The closing button was located where the burger button was. When clicking on the closing button, the click on the burger button is executed again and opens the menu.
I tried to bind a stopImmediatePropagation() to the buttons, but this doesn't work out. This only happens on iOS, Android and Desktop is fine. The functionality of the overlays comes from my used e-commerce system (Shopware 6). It is not only happening with buttons, but with other elements like divs and spans with a functionality to hide/close overlays.
Any ideas how to get rid of this?
Best regards,
Alex
I could solve it with fastclick.js
https://github.com/ftlabs/fastclick
Not what is designed for, but fortunately it solved the click issue on iOS.
I'm using angular for a mobile web project. I have a basic share button, when clicked a share modal pops up. The share modal's Close button lays on top of (higher z-index) the actual share button. The share modal is generated from external HTML so I cannot use an ng-click directive. As a work around I use the following:
document.querySelector('#shareContent .shareClose').addEventListener('touchend', function( e ){
e.stopPropagation();
$scope.$apply(function(){
$scope.showShareOverlay = false;
})
console.log("closing the share", $scope.showShareOverlay)
})
My issue is that when I touchend the .shareClose button, the modal closes for a brief moment before showing again. Somehow the touch event is being transferred to the below share button to launch the modal again. Is there anyway to prevent the event from bleeding through to the share button?
I had a similar issue with the Android stock browser. Whatever was underneath the close button for my modal would also get clicked shortly after tapping the close button.
Using the fastclick library on the app stopped this behaviour from happening, presumably due to the specific way it handles click events.
When a modal dialog box is open in iFrame, intially I can't focus a textbox in parent frame. The text box gets focused/selected and the looses focus right away. When I click (right or left click) on the content of modal dialog box, then I can select/focus the text box in parent frame. The same thing happens with drop down menu, it closes right away.
I've tried jquery trigger and parent.foucs but neither worked, is there something similar I can do programmatically?
I'm using dojo framework but I'm thinking its more of a html issue.
Any help is greatly appreciated.
Thanks
figured it out. Had to set autofocus="false" for dialog setup. It's a framework specific solution.
When using the JQueryUI modal dialog, the close button is automatically focused leading the title exposed through the jquery tooltip. I want nothing in the modal to be focused. I have tried to add a click trigger on the title of the modal window, but it seems that it had no effect.
Does anybody have a solution for this?
You can try triggering the blur event on the close button after the modal shows up.
Ex:
$('close-button-selector-here').blur();
Any Ideas?
I tried inserting ....({ .....,...., close:false,....}) and nothing.
Thanks in advance.
PS: I will close the modal window when satisfied with $.modal.close();
If you call a modal window as you have indicated {close:false}, the following will happen:
The closeHTML will not be displayed
The user cannot click the overlay to close the dialog
The user cannot press ESC to close the dialog
If you have a button/link in your code with the simplemodal-close class, the user will still be able to press that to close the dialog.
So, based on the information you have provided, if you are using {close:false}, the only other way possible for a user to close the dialog is if you have provided a way for them to. As such, you need to hide, disable, or remove the simplemodal-close class until you are ready for them to close the dialog.