[Svn] r2866 - in trunk/roundcubemail: . skins/default

trac at roundcube.net trac at roundcube.net
Mon Aug 24 19:10:23 CEST 2009


Author: alec
Date: 2009-08-24 12:10:23 -0500 (Mon, 24 Aug 2009)
New Revision: 2866

Modified:
   trunk/roundcubemail/CHANGELOG
   trunk/roundcubemail/skins/default/splitter.js
Log:
- Fix selection disabling while dragging splitter in webkit browsers (#1486056)


Modified: trunk/roundcubemail/CHANGELOG
===================================================================
--- trunk/roundcubemail/CHANGELOG	2009-08-23 07:36:00 UTC (rev 2865)
+++ trunk/roundcubemail/CHANGELOG	2009-08-24 17:10:23 UTC (rev 2866)
@@ -1,6 +1,7 @@
 CHANGELOG RoundCube Webmail
 ===========================
 
+- Fix selection disabling while dragging splitter in webkit browsers (#1486056)
 - Added 'new_messages' plugin hook (#1486005)
 - Added 'logout_after' plugin hook (#1486042)
 - Added 'message_compose' hook

Modified: trunk/roundcubemail/skins/default/splitter.js
===================================================================
--- trunk/roundcubemail/skins/default/splitter.js	2009-08-23 07:36:00 UTC (rev 2865)
+++ trunk/roundcubemail/skins/default/splitter.js	2009-08-24 17:10:23 UTC (rev 2866)
@@ -94,10 +94,14 @@
    */
   this.onDragStart = function(e)
     {
+    // disable text selection while dragging the splitter
+    if (window.webkit || bw.safari)
+      document.body.style.webkitUserSelect = 'none';
+
     this.p1pos = this.relative ? $(this.p1).position() : $(this.p1).offset();
     this.p2pos = this.relative ? $(this.p2).position() : $(this.p2).offset();
     this.drag_active = true;
-    
+
     // start listening to mousemove events
     rcube_event.add_listener({element:document, event:'mousemove', object:this, method:'onDrag'});
     rcube_event.add_listener({element:document, event:'mouseup', object:this, method:'onDragStop'});
@@ -177,6 +181,10 @@
    */
   this.onDragStop = function(e)
     {
+    // resume the ability to highlight text
+    if(window.webkit || bw.safari)
+      document.body.style.webkitUserSelect = 'auto';
+
     // cancel the listening for drag events
     rcube_event.remove_listener({element:document, event:'mousemove', object:this, method:'onDrag'});
     rcube_event.remove_listener({element:document, event:'mouseup', object:this, method:'onDragStop'});

_______________________________________________
http://lists.roundcube.net/mailman/listinfo/svn



More information about the Svn mailing list