From 575e2d130778ee6d3f50c605b21e092fcb1cbbe4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E5=A5=95?= Date: Mon, 29 Jan 2018 23:12:30 +0800 Subject: [PATCH] Pagination: add keyup event to jumper so it works in IE11 (#9538) --- packages/pagination/src/pagination.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/pagination/src/pagination.js b/packages/pagination/src/pagination.js index b1fd66c80..a88680b96 100644 --- a/packages/pagination/src/pagination.js +++ b/packages/pagination/src/pagination.js @@ -214,6 +214,11 @@ export default { this.resetValueIfNeed(target.value); this.reassignMaxValue(target.value); }, + handleKeyup({ keyCode, target }) { + if (keyCode === 13 && this.oldValue && target.value !== this.oldValue) { + this.handleChange(target.value); + } + }, handleChange(value) { this.$parent.internalCurrentPage = this.$parent.getValidCurrentPage(value); this.oldValue = null; @@ -248,6 +253,7 @@ export default { domPropsValue={ this.$parent.internalCurrentPage } type="number" ref="input" + nativeOnKeyup={ this.handleKeyup } onChange={ this.handleChange } onFocus={ this.handleFocus } onBlur={ this.handleBlur }/>