Comments (10)
We currently use store.js
. so one initial take on this would be to determine if the store wrapper is present, if so, use that. else use the localstorage API directly, and try to handle errors properly.
from ckeditor-spell-check-plugin-js-dev-edge.
This will be quite difficult to test.
I'm not convinced that disabling DOM Storage is actually the same as disallowing it. Disabling DOM Storage makes localStorage
null
. But the production stacktrace has something like Access is denied
from ckeditor-spell-check-plugin-js-dev-edge.
By spec,
it actually throws an exception:
https://mathiasbynens.be/notes/localstorage-pattern#comment-9
from ckeditor-spell-check-plugin-js-dev-edge.
So one thing to verify is whether or not store.js uses this pattern.
If so, great, let's just swap.
If not, this plugin needs to keep a state of whether or not localStorage is available, based on the results of that ugly try/catch idea.
from ckeditor-spell-check-plugin-js-dev-edge.
Not currently a huge fan of the existing "roll your own suggestions by just putting everything into a string, separated by nbsps" implementation...
from ckeditor-spell-check-plugin-js-dev-edge.
Possible way to manually test it: go into private browsing mode in Chrome?
from ckeditor-spell-check-plugin-js-dev-edge.
Found #23 while testing this, which makes manual testing quite annoying, since you can't consistently typo a word without the wrapped nbsps.
from ckeditor-spell-check-plugin-js-dev-edge.
Next problem: how to properly mock the different localstorage states. sinon doesn't seem very happy with me attempting to mock localStorage.getItem, but I may be doing something wrong. error message very cryptic.
from ckeditor-spell-check-plugin-js-dev-edge.
Possible way to test this: customers reported it when we were not a trusted site in IE.
from ckeditor-spell-check-plugin-js-dev-edge.
fixed in #24
from ckeditor-spell-check-plugin-js-dev-edge.
Related Issues (20)
- Words get mashed together when being walked, if the words are around a nested list HOT 4
- Batch spellcheck XHR requests, at least for the initial load HOT 2
- Break elements in list items don't count as word boundaries HOT 3
- Short circuit the many empty nodes case
- Span reuse issues - nbsps being marked and occasional nested spans HOT 1
- Spellcheck spans are modifying document HTML HOT 5
- Pasting does not trigger spellcheck consistently on pasted blocks
- Partial words being marked as typos HOT 27
- Contractions being marked as typos HOT 7
- Selection is not stable in IE11 (probably due to bookmarks) HOT 8
- Reuse the selection bookmark when doing batched scan/render HOT 5
- Degenerate cases with initial spellcheck HOT 2
- Stop creating bookmarks when touching blocks that the selection is not in HOT 5
- Quick fix: can't actually use bookmarks2 for marking words
- make editor more responsive when marking typos HOT 3
- Reuse range iterator across renders (or more efficiently batch renders together) HOT 2
- Fix the backwards events tests HOT 1
- Change some of the event handlers into commands HOT 1
- have a way of resetting the plugin for testing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ckeditor-spell-check-plugin-js-dev-edge.