summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-04-03 23:59:42 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-04-03 23:59:42 +0200
commit19bab14274f516091b1985d44709f0ad678771c9 (patch)
tree28883f0b151c10cfca22f18a3ac201a547b30bd6
parent4ab9494fc90d9131afd50048369b92c2e47a9b6a (diff)
Don't prevent shortcuts if a button (starred icon for instance) is focused (theres no input for buttons anyways), fix #497
-rw-r--r--CHANGELOG1
-rw-r--r--js/app/directives/itemshortcuts.coffee3
-rw-r--r--js/public/app.js2
3 files changed, 3 insertions, 3 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 3b15e7437..adfc87b79 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,7 @@ owncloud-news (1.808)
* Also focus article area when clicking on all unread link
* Autofocus article area by default on load
* Instantiate only one itemcontroller, prevents tons of requests when autopaging
+* Fix bug that would disable keyboard shortcuts after the star icon has been clicked
owncloud-news (1.807)
* Don't crash if an HttpException occurs in the python updater
diff --git a/js/app/directives/itemshortcuts.coffee b/js/app/directives/itemshortcuts.coffee
index 49dc75b37..8eec1bf0a 100644
--- a/js/app/directives/itemshortcuts.coffee
+++ b/js/app/directives/itemshortcuts.coffee
@@ -102,8 +102,7 @@ angular.module('News').directive 'itemShortcuts', ['$window', ($window) ->
if not (focused.is('input') or
focused.is('select') or
focused.is('textarea') or
- focused.is('checkbox') or
- focused.is('button'))
+ focused.is('checkbox'))
# activate shortcuts only if modifier keys are not pressed
if not(e.shiftKey or e.altKey or e.ctrlKey or e.metaKey)
diff --git a/js/public/app.js b/js/public/app.js
index 57306e34a..5982ab587 100644
--- a/js/public/app.js
+++ b/js/public/app.js
@@ -327,7 +327,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
return $($window.document).keydown(function(e) {
var focused, scrollArea;
focused = $(':focus');
- if (!(focused.is('input') || focused.is('select') || focused.is('textarea') || focused.is('checkbox') || focused.is('button'))) {
+ if (!(focused.is('input') || focused.is('select') || focused.is('textarea') || focused.is('checkbox'))) {
if (!(e.shiftKey || e.altKey || e.ctrlKey || e.metaKey)) {
scrollArea = elm;
if (e.keyCode === 74 || e.keyCode === 39 || e.keyCode === 78) {