1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-01 04:45:45 +01:00
This commit is contained in:
Kris Maglione
2009-04-22 13:15:56 -04:00
parent 9320c5b1be
commit 2f753b6d27
7 changed files with 46 additions and 21 deletions

View File

@@ -85,10 +85,7 @@ function Editor() //{{{
// Used in addAbbrevation and expandAbbreviation
var abbrevmatch = full_id + "|" + end_id + "|" + non_id;
function getEditor()
{
return window.document.commandDispatcher.focusedElement;
}
function getEditor() liberator.focus;
function getController()
{
@@ -606,7 +603,7 @@ function Editor() //{{{
unselectText: function ()
{
let elem = window.document.commandDispatcher.focusedElement;
let elem = liberator.focus;
// A error occurs if the element has been removed when "elem.selectionStart" is executed.
try {
if (elem && elem.selectionEnd)
@@ -630,7 +627,7 @@ function Editor() //{{{
}
// FIXME: #93 (<s-insert> in the bottom of a long textarea bounces up)
let elem = window.document.commandDispatcher.focusedElement;
let elem = liberator.focus;
if (elem.setSelectionRange && util.readFromClipboard())
// readFromClipboard would return 'undefined' if not checked
@@ -887,7 +884,7 @@ function Editor() //{{{
let textBox = null;
if (!(config.isComposeWindow))
textBox = document.commandDispatcher.focusedElement;
textBox = liberator.focus;
let text = ""; // XXX
if (textBox)