[Q] replacing the textarea widget

Koos Vriezen koos.vriezen at xs4all.nl
Fri Sep 3 12:46:58 BST 2004


On Fri, Sep 03, 2004 at 12:59:38PM +0200, Koos Vriezen wrote:
> On Thu, Sep 02, 2004 at 11:04:17PM +0200, Koos Vriezen wrote:
> > Btw. anyone looked at wysiwyg editors like FCKeditor. Is this where
> > caret mode was designed for?
> 
> Here is the demo btw. http://www.fckeditor.net/Demo/
> It makes khtml feel like the pre-CSS days :-(
> 
> Anyway, first thing I found looking at the samples that comes with the
> sources (you must access these by using a web server) is this testcase:
>  <html><head>
>  <script>function loaded() {
>     window.open("http://www.kde.org", "frame1");
>     }
>  </script></head>
>  <frameset rows="100,*" onLoad='loaded()'>
>         <frame name="frame1" SRC="about:blank">
>         <frame name="frame2" SRC="about:blank">
>     </frameset>
>  </html>
> IE and Mozilla open kde.org in frame1, but konqueror opens it as a
> separate window. A quick look shows that there is no code for it in
> openWindow().

Attached a fix :-)

Koos
-------------- next part --------------
Index: kjs_window.cpp
===================================================================
RCS file: /home/kde/kdelibs/khtml/ecma/kjs_window.cpp,v
retrieving revision 1.385
diff -u -3 -p -r1.385 kjs_window.cpp
--- kjs_window.cpp	2 Sep 2004 21:07:09 -0000	1.385
+++ kjs_window.cpp	3 Sep 2004 11:45:06 -0000
@@ -1405,6 +1405,15 @@ Value Window::openWindow(ExecState *exec
       Window::retrieveWindow(p)->goURL(exec, url.url(), true /*lock history*/);
       return Window::retrieve(p);
     }
+    if ( !uargs.frameName.isEmpty() ) {
+      KHTMLPart *p = part;
+      while (p->parentPart()) p = p->parentPart();
+      p = p->findFrame( uargs.frameName );
+      if (p) {
+        Window::retrieveWindow(p)->goURL(exec, url.url(), false /*don't lock history*/);
+        return Window::retrieve(p);
+      }
+    }
     uargs.serviceType = "text/html";
 
     // request window (new or existing if framename is set)


More information about the kfm-devel mailing list