On Fri, Aug 20, 2010 at 12:23:29AM +0200, Vitaly S. wrote:
> "John J. Foerch" <[email protected]> writes:
> 
> > On Thu, Aug 19, 2010 at 11:12:50AM -0400, John J. Foerch wrote:
> >> On Thu, Aug 19, 2010 at 11:07:36AM +0200, Vitaly S. wrote:
> >> > 
> >> > Ok,  I got it.
> >> > 
> >> > The problem was with these lines in my conkeror:
> >> > 
> >> > function my_zoom_set (buffer) {
> >> >     browser_zoom_set(buffer, false, 125);
> >> > }
> >> > add_hook('create_buffer_hook', my_zoom_set);
> >> > 
> >> > The steps are:
> >> > 
> >> > 1) cokeror -q
> >> > 
> >> > 2) eval the code above.
> >> > 
> >> > 3) eval:
> >> > 
> >> > function test(I){
> >> >     I.window.open("http://www.google.com";)
> >> > };
> >> > interactive("test", "blabla", test);
> >> > 
> >> > 4) M-x test
> >> 
> >> 
> >> Okay, I was able to reproduce the problem with these steps.  Thanks for
> >> narrowing it down so well.  I will see what I can find.
> >> 
> >
> >
> > It turned out to be a timing issue with the creation of the first buffer
> > in a not-fully-initialized window.. When window.open is used to make a new
> > window (instead of conkeror's window creation api) create_buffer_hook gets
> > called before the browser is fully initialized.  This caused
> > browser_zoom_set to fail, which in turn caused other things in that hook
> > to fail, such as mode-line initialization.  For illustration sake only,
> > you can see that the problem is worked around in this alternative version
> > of my_zoom_set:
> >
> >   function my_zoom_set (buffer) {
> >       call_after_timeout(function () {
> >           browser_zoom_set(buffer, false, 125);
> >       }, 0);
> >   }
> >   add_hook('create_buffer_hook', my_zoom_set);
> >
> >
> > However, instead of using that workaround, for now use the methods I
> > talked about in my earlier post to create new windows, rather than
> > window.open.  I'll take a more detailed look at window.open some time
> > later, because even though it's not conkeror's official way to open
> > windows, ideally it should at still work.
> 
> 
> I started experiencing the problem with usual links:
> 
> 1) start conkeror -q
> 
> 2) g
> http://www.rseek.org/?cx=010923144343702598753%3Aboaz1reyxd4&newwindow=1&q=report+lines+source+error&sa=Search+functions%2C+lists%2C+and+more&cof=FORID%3A11&siteurl=www.rseek.org%2F
> 
> 3) eval
> 
> function my_zoom_set (buffer) {
>     browser_zoom_set(buffer, false, 110);
> }
> add_hook('create_buffer_hook', my_zoom_set);
> 
> 
> 4) f "any link" will open new window and no control.
> 
> So,  it's not chrome open.window problem.
> 
> Vitaly.


Ok, use the other version of my_zoom_set that I gave.  I'll mess with it
later.

-- 
John Foerch
_______________________________________________
Conkeror mailing list
[email protected]
https://www.mozdev.org/mailman/listinfo/conkeror

Reply via email to