diff options
Diffstat (limited to 'program/js')
-rw-r--r-- | program/js/app.js | 22 | ||||
-rw-r--r-- | program/js/list.js | 4 |
2 files changed, 15 insertions, 11 deletions
diff --git a/program/js/app.js b/program/js/app.js index 5d7e28640..87f20679a 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -936,16 +936,13 @@ function rcube_webmail() url._to = props; } else { - // use contact_id passed as command parameter - var n, len, a_cids = []; + var a_cids = []; + // use contact id passed as command parameter if (props) a_cids.push(props); // get selected contacts - else if (this.contact_list) { - var selection = this.contact_list.get_selection(); - for (n=0, len=selection.length; n<len; n++) - a_cids.push(selection[n]); - } + else if (this.contact_list) + a_cids = this.contact_list.get_selection(); if (a_cids.length) this.http_post('mailto', { _cid: a_cids.join(','), _source: this.env.source }, true); @@ -1647,8 +1644,6 @@ function rcube_webmail() // focus window, delayed to bring to front window.setTimeout(function() { extwin.focus(); }, 10); - // position window with setTimeout for Chrome (#1488931) - window.setTimeout(function() { extwin.moveTo(l,t); }, bw.chrome ? 100 : 10); return wname; }; @@ -6721,6 +6716,15 @@ function rcube_webmail() return 1; } + // this will detect any pdf plugin including PDF.js in Firefox + var obj = document.createElement('OBJECT'); + obj.onload = function() { rcmail.env.browser_capabilities.pdf = 1; }; + obj.onerror = function() { rcmail.env.browser_capabilities.pdf = 0; }; + obj.style.display = 'none'; + obj.type = 'application/pdf'; + obj.data = 'program/resources/blank.pdf'; + document.body.appendChild(obj); + return 0; }; diff --git a/program/js/list.js b/program/js/list.js index cf62a7c14..c6b0d3fb8 100644 --- a/program/js/list.js +++ b/program/js/list.js @@ -231,7 +231,8 @@ focus: function(e) // Un-focus already focused elements (#1487123, #1487316, #1488600, #1488620) $(':focus:not(body)').blur(); - $('iframe').each(function() { this.blur(); }); + // un-focus iframe bodies (#1489058), this doesn't work in Opera and Chrome + $('iframe').contents().find('body').blur(); if (e || (e = window.event)) rcube_event.cancel(e); @@ -692,7 +693,6 @@ select_row: function(id, mod_key, with_mouse) this.shift_start = null; this.last_selected = id; - this.list.focus(); }, |