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
};
container.onkeyup = function(e) {
if ( container.previous ) {
- setTimeout(function() {container.previous.focus();}, 10);
+ setTimeout(function() {
+ //container.previous.value = container.value;
+ container.previous.focus();
+ }, 10);
}
return true;
}
% } # 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>