fix hitting return key in HeaderView

This fixes return key behaviour in Chrome. Steps to reproduce:
- open Swagger UI in Chrome
- modify URL of swagger spec
- hit 'return'

Expected behaviour: load swagger.json from new URL
Observed behaviour before applying this fix: the whole page will reload
with the default swagger petstore URL in the input field.
This commit is contained in:
Marco Süß
2016-08-04 16:04:01 +02:00
parent e991c70f9e
commit cd57350dcd
3 changed files with 4 additions and 2 deletions

1
dist/swagger-ui.js vendored
View File

@@ -22223,6 +22223,7 @@ SwaggerUi.Views.HeaderView = Backbone.View.extend({
events: {
'click #show-pet-store-icon' : 'showPetStore',
'click #explore' : 'showCustom',
'submit #api_selector' : 'showCustom',
'keyup #input_baseUrl' : 'showCustomOnKeyup',
'keyup #input_apiKey' : 'showCustomOnKeyup'
},

File diff suppressed because one or more lines are too long

View File

@@ -4,6 +4,7 @@ SwaggerUi.Views.HeaderView = Backbone.View.extend({
events: {
'click #show-pet-store-icon' : 'showPetStore',
'click #explore' : 'showCustom',
'submit #api_selector' : 'showCustom',
'keyup #input_baseUrl' : 'showCustomOnKeyup',
'keyup #input_apiKey' : 'showCustomOnKeyup'
},