kezzine / django-genericadmin

Automatically exported from code.google.com/p/django-genericadmin
0 stars 0 forks source link

Safari and window.onbeforeunload isn't working #1

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
        // TODO: This apparently doesn't work in safari...
        $(win).bind('beforeunload', function() {
            // This complicated guy is needed because when the window is 'unloaded' the value 
selected isn't
            // inserted in the object_id field quite yet, so we set a small delay--setTimeout is a 
pain...
            function timedReset(me) {
                var me = me;
                this.update = function(){
                    me.updateObjectIdEl();
                };
                this.go = function() {
                    setTimeout(this.update, 200);
                }
            };
            updater = new timedReset(self);
            updater.go();
        });

This isn't working in Safari

Original issue reported on code.google.com by wniel...@gmail.com on 22 Feb 2008 at 9:16