keep javascript from changing window properties
David Faure
david at mandrakesoft.com
Fri Oct 11 14:59:14 BST 2002
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Friday 11 October 2002 15:17, Leo Savernik wrote:
> Am Freitag, 11. Oktober 2002 12:19 schrieb David Faure:
> > On Thursday 10 October 2002 22:36, Leo Savernik wrote:
> > > That will keep some pages from resizing my carefully sized window or to
> > > move it to another position. I also can't stand those pages which pop
> > > into the foreground unexpectedly and interrupt my workflow and which
> > > think that they are smarter than me for not letting me see the real url
> > > of links in the status bar.
> >
> > Looks good. But one problem is that this kind of behaviour is usually ok
> > (and necessary) on one site, and annoying on another. So this kind of
> > setting should be configurable on a host/domain basis.
> >
> Ahem, I can't imagine of *any* page that will break when it cannot resize or
> move the browser window because those properties do absolutely contribute
> nothing to the page content.
I play lotto on websites. When you submit your pick, it opens a small window
that says "your choice has been submitted". If that window was of a normal size,
_that_ would be annoying. The contents are very small, so it only needs to be small
(and the fixed position of the window also helps, it's easier to close it every time).
Hmm, ok, this is usually done with arguments in window.open,
but it could also be done with a window.resize()/window.move() if it was in
the same window. Ok, I realize a "real example" becomes a "theoretical example"
since controlling the size and position of a _newly created_ window is different
from controlling the size and position of an _existing_ window. Hmm.
> I'm of the opinion that resizing/moving windows per javascript is 99.9%
> annoying, that's why I only proposed global settings.
Ok. Why not. But the window popup policy definitely has to become per-domain,
so wouldn't it be more consistent to make it so that everything is both global
and per-domain?
> If you really want all JS/Java/Cookie options configurable on a domain basis,
> then please consider it doing in a non-sucking way:
>
> - have global settings (as it is mostly now)
> - for every per-domain setting, provide the option "use global".
Sure.
> Please do *not* scrap the global options in favor of per-domain settings as I
> think most users would not need them anyway.
Nobody was saying we shouldn't have global options. Note that the stuff that's
already per-domain (JS on/off), is also tied to a global setting.
> Then each option within the
> per-domain settings should be prefixed with a "[x] use global" checkbox
> initially checked and the options grayed out. If and only if the user
> disables the "use global" this option for the specific per-domain setting
> becomes editable and takes effect.
It's simpler to just have radio-buttons ;)
> Well, here a little illustration what I mean:
>
> Domain foo.bar.com
>
> enable java: [x] use global [ ] yes [ ] no
> enable javascript: [x] use global [ ] yes [ ] no
> window.open policy: [x] use global [ ] always [ ] never [ ] ask [ ] smart
> window.resize policy: [x] use global [ ] allow [ ] deny
> window.move policy: [x] use global [ ] allow [ ] deny
> window.status policy: [x] use global [ ] allow [ ] deny
> ... and all the other setting following the above scheme
Yes (with radio buttons).
> This allows pre-domain settings to only overwrite specific global options and
> inherit the other global options.
>
> Well, I digress, I haven't thought about gui and domain-specific implications
> at all when writing that patch. As far as I am concerned I would be perfectly
> happy if resizing and moving policies would be implemented at the primitive
> level in kde 3.2 I proposed.
And I'd be very happy to see a patch that does the above ;-)
- --
David FAURE, david at mandrakesoft.com, faure at kde.org
http://people.mandrakesoft.com/~david/
Contributing to: http://www.konqueror.org/, http://www.koffice.org/
Get the latest KOffice - http://download.kde.org/stable/koffice-1.2/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE9ptkz72KcVAmwbhARArUJAKCmT7wEMLqYUsOQIJDJW5GPw8DrfQCfbnJ0
2rxjIsVi+m8qm0Iv4FCbQic=
=qhBk
-----END PGP SIGNATURE-----
More information about the kfm-devel
mailing list