Return-Path: X-Original-To: apmail-cordova-dev-archive@www.apache.org Delivered-To: apmail-cordova-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6F40411547 for ; Fri, 15 Aug 2014 17:56:14 +0000 (UTC) Received: (qmail 65871 invoked by uid 500); 15 Aug 2014 17:56:14 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 65832 invoked by uid 500); 15 Aug 2014 17:56:14 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 65815 invoked by uid 99); 15 Aug 2014 17:56:13 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Aug 2014 17:56:13 +0000 X-ASF-Spam-Status: No, hits=2.5 required=5.0 tests=FREEMAIL_REPLY,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,URIBL_DBL_ABUSE_REDIR,URIBL_DBL_REDIR X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of purplecabbage@gmail.com designates 209.85.220.170 as permitted sender) Received: from [209.85.220.170] (HELO mail-vc0-f170.google.com) (209.85.220.170) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Aug 2014 17:55:47 +0000 Received: by mail-vc0-f170.google.com with SMTP id lf12so3341306vcb.1 for ; Fri, 15 Aug 2014 10:55:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=aLhR4/xL1wO4L9QX1Ss8sXfC1pJwD9abqC23t8SRzJ8=; b=mpnGymqLMyfFrBLBOh1vrlGUCsz2WdEL2//HRDXjbSdEk8r8+px1duvjKIco6ujDMt ZiWfWisSncp82AQpVeFmrwTIljgYxVSUnT/haLPr26co1vGaM09Nt0siHuXhsynkDV1U MUEXe8Dj8p0kBKDgO07vAiFlSnWi30qxu1JPMxsZCAVMzEGp8zS5iwbZuXH2q8m0JZ/+ ewjXKOrtFdtSwQT3U19rtGBWX5QQDKbkI/3QoiMpz5ypsoH1+zQVN4Q+BQYMzEJ2VLkH aDcMsdIXyhej5py+BZJ63EFsheOxmkzHhJSWsMMsutjZ+VVg5vz+52wj46RHbHj9arcp mtMw== MIME-Version: 1.0 X-Received: by 10.52.156.100 with SMTP id wd4mr9130vdb.39.1408125346353; Fri, 15 Aug 2014 10:55:46 -0700 (PDT) Received: by 10.220.67.135 with HTTP; Fri, 15 Aug 2014 10:55:46 -0700 (PDT) In-Reply-To: References: <53EC1E33.8010406@tmbsw.com> Date: Fri, 15 Aug 2014 10:55:46 -0700 Message-ID: Subject: Re: OnDeviceReady with unstable behaviour From: Jesse To: "dev@cordova.apache.org" Content-Type: multipart/alternative; boundary=047d7b5d2eb6119bb50500aebb6f X-Virus-Checked: Checked by ClamAV on apache.org --047d7b5d2eb6119bb50500aebb6f Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable That is almost exactly the same image as mine! I ended up sending it directly to Leonardo, and didn't update the list. Should we change the email settings? @purplecabbage risingj.com On Fri, Aug 15, 2014 at 7:04 AM, Carlos Santana wrote: > stupid mailing list doesn't allow images, Feeling ->"punch me in the face > now" > > here is an image: > > http://bit.ly/1m1CLOT > > > > > On Thu, Aug 14, 2014 at 7:09 PM, Leonardo Mart=C3=ADnez > wrote: > > > I can't find the more dropdown and I can't see the image either... > > > > > > On Thu, Aug 14, 2014 at 4:03 PM, Jesse wrote: > > > > > 'More' dropdown -> attach files > > > > > > [image: Inline image 1] > > > > > > @purplecabbage > > > risingj.com > > > > > > > > > On Thu, Aug 14, 2014 at 3:55 PM, Leonardo Mart=C3=ADnez < > leolib2004@gmail.com > > > > > > wrote: > > > > > >> Thanks guys. How do I add a cordova project into the issue? I signe= d > up > > >> but I don't see how to add that... > > >> > > >> > > >> On Thu, Aug 14, 2014 at 8:09 AM, Carlos Santana > > > >> wrote: > > >> > > >> > Leonard open a JIRA [1] item, with a simple cordova project to > > recreate > > >> > problem. > > >> > > > >> > Maybe with more details someone can take a look and help. > > >> > > > >> > [1]: https://issues.apache.org/jira/browse/CB > > >> > > > >> > > > >> > > > >> > On Thu, Aug 14, 2014 at 10:09 AM, Andrew Grieve < > agrieve@chromium.org > > > > > >> > wrote: > > >> > > > >> > > Hmm, good point. I have no guesses now :( > > >> > > > > >> > > > > >> > > On Wed, Aug 13, 2014 at 10:25 PM, Terence M. Bandoian < > > >> terence@tmbsw.com > > >> > > > > >> > > wrote: > > >> > > > > >> > > > Right. The docs also include the following: > > >> > > > > > >> > > > "The deviceready event behaves somewhat differently from other= s. > > Any > > >> > > event > > >> > > > handler registered after the deviceready event fires has its > > >> callback > > >> > > > function called immediately." > > >> > > > > > >> > > > -Terence > > >> > > > > > >> > > > > > >> > > > > > >> > > > On 8/13/2014 8:29 PM, Joe Bowser wrote: > > >> > > > > > >> > > >> When subscribing to the events, it should actually run right > away > > >> if > > >> > the > > >> > > >> event was already fired. This is definitely a regression in > > >> > cordova.js, > > >> > > or > > >> > > >> a design change I didn't catch. Both are possible. > > >> > > >> On Aug 13, 2014 5:59 PM, "Terence M. Bandoian" < > > terence@tmbsw.com> > > >> > > wrote: > > >> > > >> > > >> > > >> Same on > http://cordova.apache.org/docs/en/3.5.0/cordova_events_ > > >> > > >>> events.md.html#deviceready. > > >> > > >>> > > >> > > >>> -Terence > > >> > > >>> > > >> > > >>> > > >> > > >>> On 8/13/2014 7:51 PM, Terence M. Bandoian wrote: > > >> > > >>> > > >> > > >>> From the phonegap 3.5.0 docs: > > >> > > >>>> > > >> > > >>>> > > >> > > >>>> > > >> > > >>>> > > >> > > >>>> Device Ready Example > > >> > > >>>> > > >> > > >>>> > > >> > > >>>> > > >> > > >>>> > > >> > > >>>> > > >> > > >>>> > > >> > > >>>> > > >> > > >>>> > > >> > > >>>> -Terence > > >> > > >>>> > > >> > > >>>> > > >> > > >>>> On 8/13/2014 3:52 PM, Carlos Santana wrote: > > >> > > >>>> > > >> > > >>>> Like Andrew mentioned too late to add the listener. > > >> > > >>>>> > > >> > > >>>>> Where are you putting your cordova.js? If you are loading = it > > >> from > > >> > > >>>>> > > >> > > >>>>> then device ready is firing before you attach. > > >> > > >>>>> > > >> > > >>>>> To be on the super safe side attach the listener before y= ou > > >> load > > >> > > >>>>> cordova.js in body, to be on the safe side. > > >> > > >>>>> > > >> > > >>>>> > > >> > > >>>>> > > >> > > >>>>> On Wed, Aug 13, 2014 at 2:40 PM, Andrew Grieve < > > >> > agrieve@chromium.org > > >> > > > > > >> > > >>>>> wrote: > > >> > > >>>>> > > >> > > >>>>> My guess: Don't wait until onload to register your > > deviceready > > >> > > >>>>> listener. > > >> > > >>>>> > > >> > > >>>>>> > > >> > > >>>>>> On Wed, Aug 13, 2014 at 1:43 PM, Leonardo Mart=C3=ADnez < > > >> > > >>>>>> leolib2004@gmail.com> > > >> > > >>>>>> wrote: > > >> > > >>>>>> > > >> > > >>>>>> Hi, > > >> > > >>>>>> > > >> > > >>>>>>> I am new here and I got into this mailing list because o= f > > this > > >> > > >>>>>>> strange > > >> > > >>>>>>> behaviour. > > >> > > >>>>>>> > > >> > > >>>>>>> The thing is that sometimes the ondeviceready event is n= ot > > >> > > triggerred > > >> > > >>>>>>> and > > >> > > >>>>>>> sometimes it is. I could say like the first time the > windows > > >> is > > >> > > >>>>>>> opened > > >> > > >>>>>>> (window.open("...") ) it is not triggered but going back > (to > > >> > > another > > >> > > >>>>>>> window) and in again it's triggered. > > >> > > >>>>>>> > > >> > > >>>>>>> I have this in the HTML: > > >> > > >>>>>>> > > >> > > >>>>>>> > > >> > > >>>>>>>
> > >> > > >>>>>>>
> > >> > > >>>>>>>

Connectin= g to > > >> > > Device

> > >> > > >>>>>>>

Device is > > >> Ready

> > >> > > >>>>>>>
> > >> > > >>>>>>> > > >> > > >>>>>>> .... > > >> > > >>>>>>> > > >> > > >>>>>>> > > >> > > >>>>>>> And this function in JS: > > >> > > >>>>>>> > > >> > > >>>>>>> function onLoad() { > > >> > > >>>>>>> document.addEventListener("deviceready", onDeviceReady, > > >> false); > > >> > > >>>>>>> alert("I was set"); > > >> > > >>>>>>> } > > >> > > >>>>>>> > > >> > > >>>>>>> function onDeviceReady() { > > >> > > >>>>>>> alert("Hi"); > > >> > > >>>>>>> } > > >> > > >>>>>>> > > >> > > >>>>>>> > > >> > > >>>>>>> I am working with Cordova 3.5.0-0.2.4 and this is > happening > > in > > >> > iOS. > > >> > > >>>>>>> Not > > >> > > >>>>>>> > > >> > > >>>>>>> on > > >> > > >>>>>> > > >> > > >>>>>> Android with the same code. > > >> > > >>>>>>> > > >> > > >>>>>>> Hope you can help me. Thanks! > > >> > > >>>>>>> > > >> > > >>>>>>> -- > > >> > > >>>>>>> Leonardo. > > >> > > >>>>>>> > > >> > > >>>>>>> > > >> > > >>>>>>> > > >> > > >>>>> > > >> > > > > > >> > > > > >> > > > >> > > > >> > > > >> > -- > > >> > Carlos Santana > > >> > > > >> > > > >> > > >> > > >> > > >> -- > > >> Leonardo. > > >> > > > > > > > > > > > > -- > > Leonardo. > > > > > > -- > Carlos Santana > > --047d7b5d2eb6119bb50500aebb6f--