Comparing version 1.1.6 to 1.1.7
@@ -0,1 +1,13 @@ | ||
# 1.1.7 | ||
- Fix dropdown values reverting to default [#901](https://github.com/quilljs/quill/issues/901) | ||
- Add config to prevent scroll jumping on paste [#1082](https://github.com/quilljs/quill/issues/1082) | ||
- Prevent scrolling on API source calls [#1152](https://github.com/quilljs/quill/issues/1152) | ||
- Fix tsconfig build error [#1165](https://github.com/quilljs/quill/issues/1165) | ||
- Fix delete and formatting interaction in Firefox [#1171](https://github.com/quilljs/quill/issues/1171) | ||
- Fix cursor jump on formatting in middle of text [#1176](https://github.com/quilljs/quill/issues/1176) | ||
Thanks to [@cutteroid](https://github.com/cutteroid), [@houxg](https://github.com/houxg), [@jasongisstl](https://github.com/jasongisstl), [@nikparo](https://github.com/nikparo), [@sbevels](https://github.com/sbevels), and [sferoze](https://github.com/sferoze) for your contributions to this release. | ||
# 1.1.6 | ||
@@ -2,0 +14,0 @@ |
@@ -89,3 +89,3 @@ import './polyfill'; | ||
return this.editor.update(null, mutations, index); | ||
}, source, true); | ||
}, source); | ||
}); | ||
@@ -311,2 +311,3 @@ let contents = this.clipboard.convert(`<div class='ql-editor' style="white-space: normal;">${html}<p><br></p></div>`); | ||
readOnly: false, | ||
scrollingContainer: null, | ||
strict: true, | ||
@@ -372,3 +373,3 @@ theme: 'default' | ||
userConfig = extend(true, {}, Quill.DEFAULTS, { modules: moduleConfig }, themeConfig, userConfig); | ||
['bounds', 'container'].forEach(function(key) { | ||
['bounds', 'container', 'scrollingContainer'].forEach(function(key) { | ||
if (typeof userConfig[key] === 'string') { | ||
@@ -396,3 +397,3 @@ userConfig[key] = document.querySelector(userConfig[key]); | ||
let change = modifier(); | ||
if (range != null) { | ||
if (range != null && source === Emitter.sources.USER) { | ||
if (index === true) index = range.index; | ||
@@ -399,0 +400,0 @@ if (shift == null) { |
@@ -61,2 +61,3 @@ import Delta from 'quill-delta'; | ||
this.matchers = []; | ||
this.scrollingContainer = quill.options.scrollingContainer || document.body; | ||
CLIPBOARD_CONFIG.concat(this.options.matchers).forEach((pair) => { | ||
@@ -99,3 +100,3 @@ this.addMatcher(...pair); | ||
let delta = new Delta().retain(range.index).delete(range.length); | ||
let bodyTop = document.body.scrollTop; | ||
let scrollTop = this.scrollingContainer.scrollTop; | ||
this.container.focus(); | ||
@@ -108,3 +109,3 @@ setTimeout(() => { | ||
this.quill.setSelection(delta.length() - range.length, Quill.sources.SILENT); | ||
document.body.scrollTop = bodyTop; | ||
this.scrollingContainer.scrollTop = scrollTop; | ||
this.quill.selection.scrollIntoView(); | ||
@@ -111,0 +112,0 @@ }, 1); |
@@ -37,4 +37,10 @@ import clone from 'clone'; | ||
this.addBinding({ key: Keyboard.keys.ENTER, metaKey: null, ctrlKey: null, altKey: null }, function() {}); | ||
this.addBinding({ key: Keyboard.keys.BACKSPACE }, { collapsed: true, prefix: /^.?$/ }, handleBackspace); | ||
this.addBinding({ key: Keyboard.keys.DELETE }, { collapsed: true, suffix: /^$/ }, handleDelete); | ||
if (/Gecko/i.test(navigator.userAgent)) { | ||
// Need to handle delete and backspace for Firefox in the general case #1171 | ||
this.addBinding({ key: Keyboard.keys.BACKSPACE }, { collapsed: true }, handleBackspace); | ||
this.addBinding({ key: Keyboard.keys.DELETE }, { collapsed: true }, handleDelete); | ||
} else { | ||
this.addBinding({ key: Keyboard.keys.BACKSPACE }, { collapsed: true, prefix: /^.?$/ }, handleBackspace); | ||
this.addBinding({ key: Keyboard.keys.DELETE }, { collapsed: true, suffix: /^.?$/ }, handleDelete); | ||
} | ||
this.addBinding({ key: Keyboard.keys.BACKSPACE }, { collapsed: false }, handleDeleteRange); | ||
@@ -41,0 +47,0 @@ this.addBinding({ key: Keyboard.keys.DELETE }, { collapsed: false }, handleDeleteRange); |
@@ -115,5 +115,3 @@ import Delta from 'quill-delta'; | ||
let option; | ||
if (range == null) { | ||
option = null; | ||
} else if (formats[format] == null) { | ||
if (range == null || formats[format] == null) { | ||
option = input.querySelector('option[selected]'); | ||
@@ -120,0 +118,0 @@ } else if (!Array.isArray(formats[format])) { |
{ | ||
"name": "quill", | ||
"version": "1.1.6", | ||
"version": "1.1.7", | ||
"description": "Your powerful, rich text editor", | ||
@@ -39,17 +39,17 @@ "author": "Jason Chen <jhchen7@gmail.com>", | ||
"extend": "~3.0.0", | ||
"parchment": "1.0.4", | ||
"parchment": "1.0.6", | ||
"quill-delta": "3.4.3" | ||
}, | ||
"devDependencies": { | ||
"babel-core": "^6.18.2", | ||
"babel-loader": "^6.2.8", | ||
"babel-core": "^6.20.0", | ||
"babel-loader": "^6.2.9", | ||
"babel-plugin-istanbul": "^3.0.0", | ||
"babel-plugin-transform-es2015-modules-commonjs": "^6.18.0", | ||
"babel-preset-es2015": "^6.18.0", | ||
"css-loader": "~0.26.0", | ||
"eslint": "^3.11.1", | ||
"css-loader": "~0.26.1", | ||
"eslint": "^3.12.1", | ||
"eslint-loader": "^1.6.1", | ||
"extract-text-webpack-plugin": "^1.0.1", | ||
"html-loader": "~0.4.4", | ||
"http-proxy": "^1.15.2", | ||
"http-proxy": "^1.16.2", | ||
"jasmine-core": "^2.5.2", | ||
@@ -59,3 +59,3 @@ "karma": "^1.3.0", | ||
"karma-coverage": "^1.1.1", | ||
"karma-jasmine": "^1.0.2", | ||
"karma-jasmine": "^1.1.0", | ||
"karma-sauce-launcher": "^1.1.0", | ||
@@ -66,8 +66,9 @@ "lodash": "^4.17.2", | ||
"stylus-loader": "^2.4.0", | ||
"ts-loader": "~1.2.2", | ||
"typescript": "^2.0.10", | ||
"wdio-jasmine-framework": "~0.2.16", | ||
"webdriver-manager": "^10.2.8", | ||
"webdriverio": "^4.4.0", | ||
"webpack": "^1.13.3", | ||
"ts-loader": "^1.3.2", | ||
"typescript": "^2.1.4", | ||
"wdio-jasmine-framework": "~0.2.17", | ||
"wdio-spec-reporter": "~0.0.3", | ||
"webdriver-manager": "^10.2.10", | ||
"webdriverio": "^4.5.0", | ||
"webpack": "^1.14.0", | ||
"webpack-dev-server": "^1.16.2" | ||
@@ -74,0 +75,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2139151
22555
29
+ Addedparchment@1.0.6(transitive)
- Removedparchment@1.0.4(transitive)
Updatedparchment@1.0.6