mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 03:47:57 +01:00
Fallback to useable clipboard on Windows. Closes issue #690.
This commit is contained in:
@@ -1518,13 +1518,18 @@ var Buffer = Module("Buffer", {
|
||||
},
|
||||
|
||||
_exWidth: function _exWidth(elem) {
|
||||
let div = DOM(<elem style="width: 1ex !important; position: absolute !important; padding: 0 !important; display: block;"/>,
|
||||
elem.ownerDocument).appendTo(elem.body || elem);
|
||||
try {
|
||||
return parseFloat(div.style.width);
|
||||
let div = DOM(<elem style="width: 1ex !important; position: absolute !important; padding: 0 !important; display: block;"/>,
|
||||
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;
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user