Quantcast
Channel: Developer to developer
Viewing all articles
Browse latest Browse all 9076

On enter click inside custom dojo widget floating wrapper

$
0
0

Hello!

 

I have problems with creating a  custom editor descriptor using dojo widget.

 

I want the user to be able to press Enter in textbox to perform an search. But the problem is that the dialog closes before the

OnSubmit event Is reached when the view is in on-page edit.

 

How can I prevent the dialog(uiWrapperType.Floating) from closing? (it works in all properties view but not in on page edit)

 

Code I’m using:

  postCreate: function () {

     var self = this;

 

          on(self.searchPeopleForm, "Submit", function (e) {

            e.preventDefault();

 

            self._onSearchPersonsClick(event);

          });

}

 

  <div id="divSearchPeople" class="peoplePickerExpanded" style="display: none" data-dojo-type="dijit/form/Form" data-dojo-id="searchPeople"  data-dojo-attach-point="searchPeopleForm">

      <h3>Search person (double click to select)</h3>

      <input name="stringTextbox" id="stringTextbox" type="text" data-dojo-type="dijit/form/TextBox" data-dojo-attach-point="searchStringTextbox" placeholder="Search person" />

      <button data-dojo-type="dijit/form/Button" type="submit" data-dojo-attach-point="searchPersons" title="Search">Search persons</button>

      <br />

  </div>

 


Viewing all articles
Browse latest Browse all 9076

Trending Articles