[freeside-commits] branch FREESIDE_3_BRANCH updated. 71f139bf51a5415553f7a6846d24a762d0b4bb51
Mark Wells
mark at 420.am
Tue Jan 7 14:42:38 PST 2014
The branch, FREESIDE_3_BRANCH has been updated
via 71f139bf51a5415553f7a6846d24a762d0b4bb51 (commit)
from e68c41b6ee1425fb85af5afde1816a997bce9b10 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 71f139bf51a5415553f7a6846d24a762d0b4bb51
Author: Mark Wells <mark at freeside.biz>
Date: Tue Jan 7 14:42:25 2014 -0800
improve MAC address clipboard copy hack, #25599
diff --git a/httemplate/elements/tr-input-mask.html b/httemplate/elements/tr-input-mask.html
index 922f22f..19942b5 100644
--- a/httemplate/elements/tr-input-mask.html
+++ b/httemplate/elements/tr-input-mask.html
@@ -18,6 +18,10 @@ var t = document.getElementById('<% $id %>');
var container = document.getElementById('<%$id%>_clipboard');
var KeyHandlerDown = t.onkeydown
t.onkeydown = function(e) {
+ if (typeof(e) == 'undefined') {
+ // ie8 hack
+ e = event;
+ }
// intercept ctrl-c and ctrl-x
// and cmd-c and cmd-x on mac
// when text is selected
@@ -38,7 +42,7 @@ t.onkeydown = function(e) {
container.onkeyup = function(e) {
if ( container.previous ) {
setTimeout(function() {
- container.previous.value = container.value;
+ //container.previous.value = container.value;
container.previous.focus();
}, 10);
}
@@ -47,7 +51,7 @@ container.onkeyup = function(e) {
% } # clipboard hack
</&>
</script>
-<textarea id="<%$id%>_clipboard" style="opacity:0"></textarea>
+<input type="text" id="<%$id%>_clipboard" style="position:absolute; pointer-events: none; z-index: -1; opacity:0">
<%shared>
my $init = 0;
</%shared>
-----------------------------------------------------------------------
Summary of changes:
httemplate/elements/tr-input-mask.html | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
More information about the freeside-commits
mailing list