From c26b6fa04f3d67f0da36793520390017f41e337d Mon Sep 17 00:00:00 2001 From: Greenkeeper Date: Mon, 23 Jan 2017 13:03:05 +0100 Subject: [PATCH] =?UTF-8?q?Update=20ember-one-way-controls=20to=20version?= =?UTF-8?q?=202.0.0=20=F0=9F=9A=80=20(#475)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(package): update ember-one-way-controls to version 2.0.0 * update yarn.lock * update `gh-trim-focus-input` for removal of `sanitizeInput` in `ember-one-way-controls` --- ghost/admin/app/components/gh-trim-focus-input.js | 14 +++++++++----- ghost/admin/package.json | 2 +- ghost/admin/yarn.lock | 8 ++++---- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/ghost/admin/app/components/gh-trim-focus-input.js b/ghost/admin/app/components/gh-trim-focus-input.js index 36426a707c..5569333f90 100644 --- a/ghost/admin/app/components/gh-trim-focus-input.js +++ b/ghost/admin/app/components/gh-trim-focus-input.js @@ -31,12 +31,16 @@ const TrimFocusInputComponent = GhostInput.extend({ this._focus(); }, - sanitizeInput(input) { - if (input && typeof input.trim === 'function') { - return input.trim(); - } else { - return input; + focusOut(event) { + this._trimInput(event.target.value); + }, + + _trimInput(value) { + if (value && typeof value.trim === 'function') { + value = value.trim(); } + + this._processNewValue(value); }, _focus() { diff --git a/ghost/admin/package.json b/ghost/admin/package.json index 1f13f72bf1..cdccc593f2 100644 --- a/ghost/admin/package.json +++ b/ghost/admin/package.json @@ -68,7 +68,7 @@ "ember-load": "0.0.11", "ember-load-initializers": "0.6.3", "ember-myth": "0.1.1", - "ember-one-way-controls": "1.1.2", + "ember-one-way-controls": "2.0.0", "ember-power-select": "1.2.0", "ember-resolver": "2.1.1", "ember-route-action-helper": "2.0.2", diff --git a/ghost/admin/yarn.lock b/ghost/admin/yarn.lock index cb307dac04..f5f564cb1d 100644 --- a/ghost/admin/yarn.lock +++ b/ghost/admin/yarn.lock @@ -2362,11 +2362,11 @@ ember-new-computed@^1.0.0, ember-new-computed@^1.0.2: dependencies: ember-cli-babel "^5.1.5" -ember-one-way-controls@1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/ember-one-way-controls/-/ember-one-way-controls-1.1.2.tgz#9ebaba62bb43bf3d5e680f0d13b996353e47ce6d" +ember-one-way-controls@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ember-one-way-controls/-/ember-one-way-controls-2.0.0.tgz#7a79f1a56094c44fe1012fd0f9b75bd92d136fe9" dependencies: - ember-cli-babel "^5.1.6" + ember-cli-babel "^5.1.7" ember-cli-htmlbars "^1.0.10" ember-get-helper "~1.1.0" ember-invoke-action "1.4.0"