diff --git a/common/content/dactyl.js b/common/content/dactyl.js
index edc5e14b..b9d95718 100644
--- a/common/content/dactyl.js
+++ b/common/content/dactyl.js
@@ -378,10 +378,8 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
* @optional
*/
clipboardWrite: function clipboardWrite(str, verbose, which) {
- if (which == null)
+ if (which == null || which == "selection" && !services.clipboard.supportsSelectionClipboard())
services.clipboardHelper.copyString(str);
- else if (which == "selection" && !services.clipboard.supportsSelectionClipboard())
- return;
else
services.clipboardHelper.copyStringToClipboard(str,
services.clipboard["k" + util.capitalize(which) + "Clipboard"]);
diff --git a/common/modules/buffer.jsm b/common/modules/buffer.jsm
index 1b7e6a60..90b5c976 100644
--- a/common/modules/buffer.jsm
+++ b/common/modules/buffer.jsm
@@ -1518,13 +1518,18 @@ var Buffer = Module("Buffer", {
},
_exWidth: function _exWidth(elem) {
- let div = DOM(,
- elem.ownerDocument).appendTo(elem.body || elem);
try {
- return parseFloat(div.style.width);
+ let div = DOM(,
+ elem.ownerDocument).appendTo(elem.body || elem);
+ try {
+ return parseFloat(div.style.width);
+ }
+ finally {
+ div.remove();
+ }
}
- finally {
- div.remove();
+ catch (e) {
+ return parseFloat(DOM(elem).fontSize) / 1.618;
}
},