-moz-user-focus equivalent for Chrome
I have a custom model dialog control that is used for any popups in our web pages. When this dialog is initialized, the rest of the page is grayed out using jquery expose . I am adding the following styles to the mask div to prevent selection on the grayed out area.
-moz-user-focus: ignore;
-moz-user-select: none;
-webkit-user-select: none;
-khtml-user-select: none;
-o-user-select: none;
user-select: none;
On the dialog, pressing ‘esc’key closes the dialog and pressing ‘enter’ key works like clicking on ok or yes button. But if the user clicks anywhere on the grayed out area; the above css prevents focus from going onto any control in the grayed out are开发者_开发百科a in firefox. For IE,I am programatically handling as follows
$('#exposeMask').attr("contenteditable", "false");
$('#exposeMask').attr("unselectable", "on");
But for Chrome, the above css -webkit-user-select prevents selection but does not help prevent focus.
I tried google to find a solution but I count not find any helpful links. Is there some style element equivalent to -moz-user-focus for chrome?
Thanks in advance, M
pointer-events: none;
That should do it.
精彩评论