mirror of
https://github.com/friendica/friendica
synced 2024-11-18 01:43:41 +00:00
Allow macOS users to use Ctrl + Cmd + Space to bring up the emoji picker in Friendica text fields
- Remove Backspace guard against changing page - Clarify keyboard shortcut to pause automatic updates
This commit is contained in:
parent
6503016676
commit
1b72a1e72d
1 changed files with 3 additions and 9 deletions
|
@ -378,16 +378,10 @@ $(function() {
|
||||||
|
|
||||||
// Allow folks to stop the ajax page updates with the pause/break key
|
// Allow folks to stop the ajax page updates with the pause/break key
|
||||||
$(document).keydown(function(event) {
|
$(document).keydown(function(event) {
|
||||||
if (event.keyCode == '8') {
|
// Pause/Break or Ctrl + Space
|
||||||
var target = event.target || event.srcElement;
|
if (event.which === 19 || (!event.shiftKey && !event.altKey && event.ctrlKey && event.which === 32)) {
|
||||||
if (!/input|textarea/i.test(target.nodeName)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (event.keyCode == '19' || (event.ctrlKey && event.which == '32')) {
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
if (stopped == false) {
|
if (stopped === false) {
|
||||||
stopped = true;
|
stopped = true;
|
||||||
if (event.ctrlKey) {
|
if (event.ctrlKey) {
|
||||||
totStopped = true;
|
totStopped = true;
|
||||||
|
|
Loading…
Reference in a new issue