Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-49339

[Eventing][UI] Pressing enter from input element creates new binding on UI

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 7.1.0
    • 7.1.0
    • eventing, UI
    • Enterprise Edition 7.1.0 build 1627
    • Untriaged
    • Centos 64-bit
    • 1
    • Unknown

    Description

      STEPS
      Press ENTER key from input box of 1 of the following attributes inside the ADD FUNCTION dialog box -

      • Function name
      • Workers
      • Script timeout
      • Timer context max size

      OBSERVATION
      New binding gets added.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          jeelan.poola Jeelan Poola added a comment -

          Pavel Blagodov We discussed this during Eventing scrum today. And it appears we are out of our depth in figuring out why this is happening. May I request your help on this one? Thank you!

          jeelan.poola Jeelan Poola added a comment - Pavel Blagodov We discussed this during Eventing scrum today. And it appears we are out of our depth in figuring out why this is happening. May I request your help on this one? Thank you!

          A quick update on what I found out before hitting my depth with the frontend:

          In the "Add Functions" page, if any of the <input type="text" / type="number" / type="password" such as following:

          https://github.com/couchbase/eventing/blob/master/ui/eventing-ui/ui-current/fragments/app-settings.html#L156

          receives an "Enter" keypress event, it appends a new binding object to the $self.bindings variable, which is then rendered here :

          https://github.com/couchbase/eventing/blob/master/ui/eventing-ui/ui-current/fragments/app-settings.html#L364

          So simplify, insert any <input type="text"> element in the form and send a keypress Enter event which appends a new binding to the bindings array.

          abhishek.jindal Abhishek Jindal added a comment - A quick update on what I found out before hitting my depth with the frontend: In the "Add Functions" page, if any of the <input type="text" / type="number" / type="password" such as following: https://github.com/couchbase/eventing/blob/master/ui/eventing-ui/ui-current/fragments/app-settings.html#L156 receives an "Enter" keypress event, it appends a new binding object to the $self.bindings variable, which is then rendered here : https://github.com/couchbase/eventing/blob/master/ui/eventing-ui/ui-current/fragments/app-settings.html#L364 — So simplify, insert any <input type="text"> element in the form and send a keypress Enter event which appends a new binding to the bindings array.
          raluca.lupu Raluca Lupu added a comment - - edited

          Hello Jeelan Poola, Sujay Gad, Abhishek Jindal

          What is the expected behaviour when user presses ENTER? (besides not adding a new Binding)

          We could:

          • do nothing or
          • submit the form and close the dialog - same behaviour as clicking on Next: Add Code

           

          raluca.lupu Raluca Lupu added a comment - - edited Hello Jeelan Poola , Sujay Gad , Abhishek Jindal What is the expected behaviour when user presses ENTER? (besides not adding a new Binding) We could: do nothing or submit the form and close the dialog - same behaviour as clicking on Next: Add Code  

          Raluca Lupu Enter shouldn't do anything. need to somehow suppress whatever event it is generating and adding bindings.
          Form should only be submitted on "Add Code".

          abhishek.jindal Abhishek Jindal added a comment - Raluca Lupu Enter shouldn't do anything. need to somehow suppress whatever event it is generating and adding bindings. Form should only be submitted on "Add Code".
          raluca.lupu Raluca Lupu added a comment -

          Thank you Abhishek Jindal, I've just push a patch with this behaviour.

          raluca.lupu Raluca Lupu added a comment - Thank you Abhishek Jindal , I've just push a patch with this behaviour.

          Build couchbase-server-7.1.0-2285 contains eventing commit 23c2faa with commit message:
          MB-49339: Add Function dialog: don't add bindings on ENTER

          build-team Couchbase Build Team added a comment - Build couchbase-server-7.1.0-2285 contains eventing commit 23c2faa with commit message: MB-49339 : Add Function dialog: don't add bindings on ENTER
          sujay.gad Sujay Gad added a comment -

          Validated the fix on Enterprise Edition 7.1.0 build 2285.

          sujay.gad Sujay Gad added a comment - Validated the fix on Enterprise Edition 7.1.0 build 2285.

          People

            sujay.gad Sujay Gad
            sujay.gad Sujay Gad
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty