Neil Jenkins
f593d8ac04
Enforce sane focus/blur events.
...
Because focus/blur events are fired synchonously, browsers can get confused if
UI code starts focusing other elements while inside a focus/blur handler, and
end up firing events in the wrong order which can cause infinite loops.
This change ensures we only get a focus/blur event when they really are
happening, and you always get one then the other.
2016-06-10 11:02:24 +10:00
Neil Jenkins
6c4f8e1aaf
Add support for default <a> attributes
...
Resolves #186 .
2016-05-05 11:50:36 +10:00
Neil Jenkins
923a0efd1a
Fix delete/backspace removing content outside editor
2016-03-26 11:20:28 +11:00
Neil Jenkins
6a348e084b
Make Squire work without an iframe(!)
2016-03-23 17:41:09 +11:00
Neil Jenkins
62616ef4ec
Add saveUndoState method to public API
...
For #174
2016-03-11 15:58:32 +11:00
Neil Jenkins
6bafa1d140
Run fixContainers before merging blocks.
...
In case paste or something has got the document into a weird state with inline
content not inside a block.
2016-02-26 14:28:53 +11:00
Neil Jenkins
7330324d92
Fix Firefox throws error if initialised with display:none
...
Fixes #168 .
2016-01-06 14:38:53 +11:00
Neil Jenkins
93f7867214
Fix Meta-Left/Right handling in Firefox.
...
Fixes #167 .
2015-12-29 11:15:01 +11:00
Neil Jenkins
9ccf765ba8
Scroll cursor into view after setting selection.
...
Fixes #162 and fixes #165 .
2015-12-09 15:12:47 +11:00
Neil Jenkins
bf8f796ea4
Add shift-tab keyboard shortcut.
...
If at beginning of list item, shift-tab decreases indent (to mirror tab to indent).
2015-11-17 16:50:55 +11:00
Neil Jenkins
162ec9049e
Make scroll on enter logic independent of CSS.
...
Fixes #149 .
2015-10-23 17:05:32 +01:00
Trey Cordova
85c9002ce5
Add tab nesting capability to list items with text in them;
...
- This requires your cursor to be at the beginning of the list item.
- This implementation mimics Google Docs.
2015-10-23 14:22:04 +02:00
Neil Jenkins
0ec3c43791
Don't prevent default on tab unless doing something.
...
Fixes #131 .
2015-09-04 18:33:11 +01:00
Neil Jenkins
8d764f6638
Fix Chrome may replace <div> with <br> if you delete all content.
...
Fixes #108 .
2015-07-13 06:39:07 -07:00
Neil Jenkins
a8fcd55cf4
Make event.preventDefault() cancel default key actions.
...
Fixes #107
2015-07-13 09:25:44 +07:00
Neil Jenkins
4f010a5de0
Override page up/down to match expected platform behaviour.
2015-06-25 11:02:56 +07:00
Neil Jenkins
395a5825e9
Split cleaning fns and clipboard handlers into separate file.
2015-06-19 14:18:32 +07:00
Neil Jenkins
09167c73e4
Make it possible to delete an <img> with display other than inline
...
Based on pull request #85 from dryoma.
2015-06-17 17:18:34 +07:00
Neil Jenkins
223060ecf9
Add method to set key handlers.
...
Resolves #70
2015-04-29 11:16:11 +07:00