Avoid undesired selections.

This commit is contained in:
Jos van den Oever
2015-06-07 20:24:19 +02:00
parent 4c00c3611d
commit 2e20ccbdbd
2 changed files with 14 additions and 0 deletions
+3
View File
@@ -262,6 +262,7 @@ xmled.XmlEditor = function XmlEditor(element, grammarurl, styleurl) {
crumbElement.style.paddingBottom = "0.1em";
crumbElement.style.backgroundColor = '#000000';
crumbElement.style.whiteSpace = 'normal';
crumbElement.className = 'unselectable';
canvasElement.style.marginTop = "0.3em";
canvasElement.style.display = "inline-block";
canvasElement.style.width = "40em";
@@ -288,6 +289,8 @@ xmled.XmlEditor = function XmlEditor(element, grammarurl, styleurl) {
attributeEditorElement.style.whiteSpace = 'normal';
attributeEditorElement.style.fontFamily = 'sans';
attributeEditorElement.style.fontSize = 'smaller';
attributeEditorElement.className = 'unselectable';
viewButtons.className = 'unselectable';
canvas = new xmled.XmlCanvas(canvasElement, validationModel, styleurl);
var root = canvas.getDocumentRoot();
crumbBar = new xmled.CrumbBar(crumbElement, root, validationModel);
+11
View File
@@ -73,3 +73,14 @@
.hoveropaque:hover {
background-color: rgba(128,128,128,0.5);
}
.unselectable {
-moz-user-select: none;
-khtml-user-select: none;
-webkit-user-select: none;
/*
* Introduced in IE 10.
* See http://ie.microsoft.com/testdrive/HTML5/msUserSelect/
* */
-ms-user-select: none;
user-select: none;
}