From 1ea2d955750803470aef63d8c461871399690f05 Mon Sep 17 00:00:00 2001 From: "mgalli%geckonnection.com" Date: Wed, 24 Aug 2005 19:50:07 +0000 Subject: [PATCH] Better cmd_paste code ala FF. --- minimo/chrome/content/minimo.js | 16 ++++++---------- minimo/chrome/content/minimo.xul | 4 ---- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/minimo/chrome/content/minimo.js b/minimo/chrome/content/minimo.js index 97b9f20cc10..04c2e40da50 100755 --- a/minimo/chrome/content/minimo.js +++ b/minimo/chrome/content/minimo.js @@ -424,19 +424,15 @@ function DoClipCheckPaste() } else return false; } -/* - Currently supports pasting text/unicode within INPUT and TEXTAREA - */ function DoClipPaste() { - var pasteTxt=DoClipCheckPaste(); - - /* With 007 does not fail. Maybe now focus is on the context menu */ - if(document.commandDispatcher.focusedElement) { - - document.commandDispatcher.focusedElement.value=pasteTxt; - } + /* 008 note - value is there in the clipboard, however somehow paste action does not happen. + If you evaluate the canpaste you get false. */ + + var disp = document.commandDispatcher; + var cont = disp.getControllerForCommand("cmd_paste"); + cont.doCommand("cmd_paste"); } function addToUrlbarHistory() diff --git a/minimo/chrome/content/minimo.xul b/minimo/chrome/content/minimo.xul index 62ee6fb4d8c..bdbaa7798b4 100755 --- a/minimo/chrome/content/minimo.xul +++ b/minimo/chrome/content/minimo.xul @@ -67,10 +67,6 @@ - - - -