diff --git a/ChangeLog b/ChangeLog index 7afe15f01..1c9a754d2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2012-03-29 Francis Lachapelle + + * UI/WebServerResources/ContactsUI.js (startDragging): create an + overlapping safety block (div) to avoid possible selection of the + underlying text. + + * UI/WebServerResources/MailerUI.js (startDragging): idem. + 2012-03-26 Wolfgang Sourdeau * OpenChange/MAPIStoreTasksMessage.m (-save): take PR_HTML as diff --git a/NEWS b/NEWS index fc85f03ac..c93bb922b 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,12 @@ +1.3.15 (2012-04-DD) +------------------- +New Features + - +Enhancements + - +Bug Fixes + - + 1.3.14 (2012-03-23) ------------------- Enhancements diff --git a/UI/WebServerResources/ContactsUI.css b/UI/WebServerResources/ContactsUI.css index 8a468ccd8..122e3ebf2 100644 --- a/UI/WebServerResources/ContactsUI.css +++ b/UI/WebServerResources/ContactsUI.css @@ -26,9 +26,7 @@ DIV#rightPanel margin-left: 5px; right: 0px; bottom: 0px; - overflow: hidden; - -moz-user-select: none; - -khtml-user-select: none; } + overflow: hidden; } /* top list */ DIV#contactsListContent @@ -41,9 +39,7 @@ DIV#contactsListContent height: 15.5em; border-left: 1px solid #9B9B9B; overflow: auto; - overflow-x: hidden; - -moz-user-select: none; - -khtml-user-select: none; } + overflow-x: hidden; } .aptview_text { diff --git a/UI/WebServerResources/ContactsUI.js b/UI/WebServerResources/ContactsUI.js index 240aecad8..97db10e60 100644 --- a/UI/WebServerResources/ContactsUI.js +++ b/UI/WebServerResources/ContactsUI.js @@ -148,8 +148,6 @@ function contactsListCallback(http) { cell.appendChild(document.createTextNode(contact["c_telephonenumber"])); } } - - configureDraggables(); } // Remove unnecessary rows @@ -1510,7 +1508,7 @@ function configureDroppables() { }); } -function currentFolderIsRemote () { +function currentFolderIsRemote() { rc = false; var selectedFolders = $("contactFolders").getSelectedNodes(); if (selectedFolders.length > 0) { @@ -1520,7 +1518,7 @@ function currentFolderIsRemote () { return rc; } -function startDragging (itm, e) { +function startDragging(itm, e) { if (!Event.isLeftClick(e)) return; var target = Event.element(e); @@ -1528,6 +1526,19 @@ function startDragging (itm, e) { return; $("contactsListContent").setStyle({ overflow: "visible" }); + + // Create overlapping safety block to avoid selection issues + var rightSafetyBlock = $("rightSafetyBlock"); + if (!rightSafetyBlock) { + rightSafetyBlock = new Element('div', {'id': 'rightSafetyBlock', 'class': 'safetyBlock'}); + document.body.appendChild(rightSafetyBlock); + } + var rightBlock = $("rightPanel"); + rightSafetyBlock.setStyle({ + top: rightBlock.getStyle('top'), + left: rightBlock.getStyle('left') }); + rightSafetyBlock.show(); + var handle = $("dragDropVisual"); var contacts = $('contactsList').getSelectedRowsId(); var count = contacts.length; @@ -1546,16 +1557,19 @@ function startDragging (itm, e) { handle.show(); } -function whileDragging (itm, e) { - var handle = $("dragDropVisual"); - if (e.shiftKey || currentFolderIsRemote ()) - handle.addClassName ("copy"); - else if (handle.hasClassName ("copy")) - handle.removeClassName ("copy"); +function whileDragging(itm, e) { + if (e) { + var handle = $("dragDropVisual"); + if (e.shiftKey || currentFolderIsRemote()) + handle.addClassName ("copy"); + else if (handle.hasClassName ("copy")) + handle.removeClassName ("copy"); + } } function stopDragging () { $("contactsListContent").setStyle({ overflow: "auto", overflowX: "hidden" }); + $("rightSafetyBlock").hide(); var handle = $("dragDropVisual"); handle.hide(); if (handle.hasClassName ("copy")) diff --git a/UI/WebServerResources/MailerUI.css b/UI/WebServerResources/MailerUI.css index 43e9b20d8..7e4bbf453 100644 --- a/UI/WebServerResources/MailerUI.css +++ b/UI/WebServerResources/MailerUI.css @@ -40,9 +40,7 @@ DIV#rightPanel margin: 0px; margin-left: 5px; padding: 0px; - overflow: hidden; - -moz-user-select: none; - -khtml-user-select: none; } + overflow: hidden; } /* top list */ DIV#mailboxContent diff --git a/UI/WebServerResources/MailerUI.js b/UI/WebServerResources/MailerUI.js index 47c6ff8fe..7715b1a2e 100644 --- a/UI/WebServerResources/MailerUI.js +++ b/UI/WebServerResources/MailerUI.js @@ -2954,7 +2954,7 @@ function configureDroppables() { }); } -function startDragging (itm, e) { +function startDragging(itm, e) { if (!Event.isLeftClick(e)) return; var target = Event.element(e); @@ -2962,6 +2962,18 @@ function startDragging (itm, e) { return; $("mailboxList").setStyle({ overflow: "visible" }); + + // Create overlapping safety block to avoid selection issues + var rightSafetyBlock = $("rightSafetyBlock"); + if (!rightSafetyBlock) { + rightSafetyBlock = new Element('div', {'id': 'rightSafetyBlock', 'class': 'safetyBlock'}); + document.body.appendChild(rightSafetyBlock); + } + var rightBlock = $("rightPanel"); + rightSafetyBlock.setStyle({ + top: rightBlock.getStyle('top'), + left: rightBlock.getStyle('left') }); + rightSafetyBlock.show(); var row = target.up('TR'); var handle = $("dragDropVisual"); @@ -2988,7 +3000,7 @@ function startDragging (itm, e) { handle.show(); } -function whileDragging (itm, e) { +function whileDragging(itm, e) { if (e) { var handle = $("dragDropVisual"); if (e.shiftKey) @@ -3000,6 +3012,7 @@ function whileDragging (itm, e) { function stopDragging() { $("mailboxList").setStyle({ overflow: "auto", overflowX: "hidden" }); + $("rightSafetyBlock").hide(); var handle = $("dragDropVisual"); handle.hide(); if (handle.hasClassName("copy")) diff --git a/UI/WebServerResources/UIxMailEditor.css b/UI/WebServerResources/UIxMailEditor.css index d0b700e31..7d047bea8 100644 --- a/UI/WebServerResources/UIxMailEditor.css +++ b/UI/WebServerResources/UIxMailEditor.css @@ -15,9 +15,7 @@ DIV#rightPanel right: 0px; bottom: 0px; margin-left: 5px; - overflow: hidden; - -moz-user-select: text; - -khtml-user-select: text; } + overflow: hidden; } DIV#hiddenDragHandle { cursor: e-resize;