diff --git a/static/css/style.css b/static/css/style.css index 670c90e..18c048a 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -3,6 +3,8 @@ html, body { background-color: #fafafa; text-align: center; font-family: sans-serif; + -moz-user-select: none; + -webkit-user-select: none; } a { @@ -599,6 +601,7 @@ h1 { -moz-border-radius-bottomright: 5px; -webkit-border-radius: 5px; -moz-user-select: none; + -webkit-user-select: none; color: #fafafa; background-color: #fafafa; min-width: 20px; @@ -910,6 +913,7 @@ h1 { .pulldown_label { -moz-user-select: none; + -webkit-user-select: none; color: #000000; text-decoration: none; } diff --git a/static/js/Editor.js b/static/js/Editor.js index f41a789..3f172e2 100644 --- a/static/js/Editor.js +++ b/static/js/Editor.js @@ -784,6 +784,10 @@ Editor.prototype.drag = function( event ) { var drop_target = drop_targets[ i ]; var target_position = getElementPosition( drop_target ); var target_size = getElementDimensions( drop_target ); + if ( WEBKIT ) { + target_position.x -= viewport_position.x; + target_position.y -= viewport_position.y; + } // if the div is wholly above or below the drop target, then it's not overlapping it if ( ( div_position.y < target_position.y && div_position.y + div_size.h < target_position.y ) ||