Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bxbEs-0007Vk-Sx for pgadmin-hackers@arkaria.postgresql.org; Fri, 21 Oct 2016 14:56:07 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bxbEs-0007eW-Fl for pgadmin-hackers@arkaria.postgresql.org; Fri, 21 Oct 2016 14:56:06 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bxbEs-0007eO-2D for pgadmin-hackers@postgresql.org; Fri, 21 Oct 2016 14:56:06 +0000 Received: from mail-qk0-x235.google.com ([2607:f8b0:400d:c09::235]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bxbEo-0001Ov-7o for pgadmin-hackers@postgresql.org; Fri, 21 Oct 2016 14:56:05 +0000 Received: by mail-qk0-x235.google.com with SMTP id o68so157568697qkf.3 for ; Fri, 21 Oct 2016 07:56:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ioBt52/eBrWykNHcKOBp2oh/7KKUtdY4VRxqWJAKGNg=; b=yguT3bAsVH4VJlj3SN+ofl8Dc1lmS/Nwi4Umg4Ncdpdzfp9PNFuCb5ovT/M6AQly4P BXh7oo0IsvnLx2SXKC6li4pGTcWw+sO4wiFCnn6HIb948WhCHEKGd0Qh7uhVTwhqFO8i xlry62UDoM8AowYSkNdnAr/iu2LjAxBpI4fqD0qabEkcFts0Uwi37rdAuDgAfYKE38of /u7cEoCIWttR3CrEb/oP4tdfSdCEZWCOVBLjRCKFOFjo7JkxOMZGBJBCx8GpNKo1fkfn kAomU9bPQFo6zJdA8mZ5cqPWExJOm0YY6cwnYLj/lGY/jJXP5CZtL2b+2bDevZb0ks22 t0LQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ioBt52/eBrWykNHcKOBp2oh/7KKUtdY4VRxqWJAKGNg=; b=ah5M/+ieRgqXmuZjl/YR3b1jSiWYSZWBU+liBtDxY92XVFoOslNjKKyokhj21t5+tN kP6qfLQtoxHaXqUDlxtQ9UlLGDZsTuqL50sHRcSi6iPrsrPlAP05nMQsK+x4SJvvKuym kx5vsiX63EMXzu2XKZfPDHQ+JWi5reSKazfOUdmaHpMilR8u5d7wIXJaawKT1s+0Qybo c4mi//0cu/+bAW/5brX9/g25B/Ec6xmi1WyLP9CDLRCTheTJPZZNAwZUc4GboX9mV2vb lXFhFpCwzXu1/If/jdyC6eRqtzAM/9bW8GG8YB3VbDBwnvrpdtku3aqAFLOKLcXzDgvC 9ONw== X-Gm-Message-State: ABUngvdM6K79ByTFUnorpgEpRat5Ygd+8fMxblaGXCyIiCQdGy6LYRsRNYGyUJKig4k61wockFaHLPySBabyE7YH X-Received: by 10.194.147.48 with SMTP id th16mr1123114wjb.68.1477061760556; Fri, 21 Oct 2016 07:56:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.172.198 with HTTP; Fri, 21 Oct 2016 07:55:29 -0700 (PDT) In-Reply-To: References: From: Surinder Kumar Date: Fri, 21 Oct 2016 20:25:29 +0530 Message-ID: Subject: Re: [pgAdmin4][Patch]: Select2 control destroy issue [Minor fix] To: Dave Page Cc: pgadmin-hackers Content-Type: multipart/mixed; boundary=089e012282b68d22ba053f613d38 X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgadmin-hackers Precedence: bulk Sender: pgadmin-hackers-owner@postgresql.org --089e012282b68d22ba053f613d38 Content-Type: multipart/alternative; boundary=089e012282b68d22b6053f613d36 --089e012282b68d22b6053f613d36 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable =E2=80=8BI missed to add the check "destroy only if select2 has destroy pro= perty'. in previous patch. It was reproducible when I select access method of exclusion constraint from combo box. Please find attached patch and review. On Sat, Oct 15, 2016 at 12:50 AM, Dave Page wrote: > Thanks, applied. > > > On Friday, October 14, 2016, Surinder Kumar com> wrote: > >> Hi >> >> While clicking on Select2 control, it tries to destroy the control and >> thus it doesn't get this object sometimes and throws error. >> >> It should attempt to destroy the select2 object only if this object is >> not undefined. >> Adds proper check to handle the case. >> >> Please find minor patch and review. >> >> Thanks >> Surinder Kumar >> > > > -- > Dave Page > Blog: http://pgsnake.blogspot.com > Twitter: @pgsnake > > EnterpriseDB UK: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > > --089e012282b68d22b6053f613d36 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
=E2= =80=8BI missed to add the check "destroy only if select2 has destroy p= roperty'. in previous patch.
It was reproducible when I select access method of exclus= ion constraint from combo box.

Please find attached patch and review.

On Sat, Oct 15, 2016 at 12:50 AM, Da= ve Page <dpage@pgadmin.org> wrote:
Thanks, applied.


= On Friday, October 14, 2016, Surinder Kumar <surinder.kumar@enterprisedb.= com> wrote:
Hi

While clicking on Select2 control, it tries to = destroy the control and thus it doesn't get this object sometimes and t= hrows error.
It should at= tempt to destroy the select2 object only if this object is not undefined.
Adds proper chec= k to handle the case.

Ple= ase find minor patch and review.

Thanks
= Surinder Kumar


--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

E= nterpriseDB UK: h= ttp://www.enterprisedb.com
The Enterprise PostgreSQL Company


--089e012282b68d22b6053f613d36-- --089e012282b68d22ba053f613d38 Content-Type: application/octet-stream; name="select2_control_destroy_issue_v2.patch" Content-Disposition: attachment; filename="select2_control_destroy_issue_v2.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_iujwc2ow0 ZGlmZiAtLWdpdCBhL3dlYi9wZ2FkbWluL3N0YXRpYy9qcy9iYWNrZm9ybS5w Z2FkbWluLmpzIGIvd2ViL3BnYWRtaW4vc3RhdGljL2pzL2JhY2tmb3JtLnBn YWRtaW4uanMKaW5kZXggNjBhNWM3OC4uOGQyZDI4MCAxMDA2NDQKLS0tIGEv d2ViL3BnYWRtaW4vc3RhdGljL2pzL2JhY2tmb3JtLnBnYWRtaW4uanMKKysr IGIvd2ViL3BnYWRtaW4vc3RhdGljL2pzL2JhY2tmb3JtLnBnYWRtaW4uanMK QEAgLTE4OTQsNyArMTg5NCw4IEBACiAgICAgXS5qb2luKCJcbiIpKSwKICAg ICByZW5kZXI6IGZ1bmN0aW9uKCkgewogCi0gICAgICBpZih0aGlzICYmIHRo aXMuJHNlbCAmJiB0aGlzLiRzZWwuc2VsZWN0MikgeworICAgICAgaWYodGhp cy4kc2VsICYmIHRoaXMuJHNlbC5zZWxlY3QyICYmCisgICAgICAgIHRoaXMu JHNlbC5zZWxlY3QyLmhhc093blByb3BlcnR5KCdkZXN0cm95JykpIHsKICAg ICAgICAgdGhpcy4kc2VsLnNlbGVjdDIoJ2Rlc3Ryb3knKTsKICAgICAgIH0K IAo= --089e012282b68d22ba053f613d38 Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers --089e012282b68d22ba053f613d38--