This repository has been archived by the owner on Jul 24, 2019. It is now read-only.
forked from steveathon/bootstrap-wysiwyg
-
Notifications
You must be signed in to change notification settings - Fork 839
Fix hotkey support, add event namespaces, add hotkey enable callback #77
Open
alanpca
wants to merge
16
commits into
mindmup:master
Choose a base branch
from
DataRecognitionCorporation:bug/Better_hotkey_and_event_support
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Fix hotkey support, add event namespaces, add hotkey enable callback #77
alanpca
wants to merge
16
commits into
mindmup:master
from
DataRecognitionCorporation:bug/Better_hotkey_and_event_support
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Fixes steveathon#19 * Problem: addRange or removeAllRanges kills the browser command states. * Store cache in commandCache * Add updateCommandCache and restoreCommandCache methods * Add support for command-with-arg buttons to be in an active state * Update command cache when running execCommand * Store and then update selected commands when selecting a toolbar button * Create the command cache by looking up the buttons that are in the DOM, set the default value to false
* Map multiple hotkeys in a string into single hotkey commands * Store them in a hash * When buttons are pressed (`keydown`), compute a string to match them on * They must match this format: * Keys must come in order of modifiers as shown below: * <CTRL>+(<SHIFT>+)<KEY> `(shift optional)` * <META>+(<SHIFT>+)<KEY> * <ALT>+(<SHIFT>+)<KEY> * <SHIFT>+<KEY> * <KEY> `(i.e. tab)` * Change `bindHotKeys` to only bind single events for `keydown` and `keyup` * Re-map the keys into a hash as mentioned above * Prevent propagation and default if we match a command we're allowed * Add callback option to test a hotkey to see if it's allowed. * Add `namsepaceEvents` helper, to create all events with a namespace * Add default callback for `hotKeyEnabledCallback` * returns `true` if a hotkey can execute browser command * takes parameter `command`. i.e. `bold`
Bug/better hotkey and event support
…font size handlers on wysiwyg
…on indent; update save/restore selection to track cursor position
…on indent; update save/restore selection to track cursor position
* Removed changes on indent from DRCWBTE-4165. ** DRCWBTE-4165 introduces an regression when used with spellcheck. ** This issue has been remedied indirectly in DRCWBTE-6975
- namespace the 'touchend' event bound to window so we can remove it - throttle 'updateToolbar' so it doesn't get called every keypress
…sues 8036_Writing_Input_Performance_Issues
Could be caused by a Chrome 38 change
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Depends on #76
keydown
), compute a string to match them on<CTRL>+(<SHIFT>+)<KEY> (shift optional)
<META>+(<SHIFT>+)<KEY>
<ALT>+(<SHIFT>+)<KEY>
<SHIFT>+<KEY>
<KEY> (i.e. tab)
bindHotKeys
to only bind single events forkeydown
andkeyup
namsepaceEvents
helper, to create all events with a namespacehotKeyEnabledCallback
true
if a hotkey can execute browser commandcommand
. i.e.bold