Make search keyboard shortcut compatible with Firefox

This commit is contained in:
Frederic Guillot 2017-01-05 21:02:20 -05:00
parent fd5731cccc
commit c8a6f45b93
5 changed files with 7 additions and 16 deletions

View File

@ -19,5 +19,6 @@
<li><?php echo t('Toggle RTL mode') ?> = <strong>z</strong></li> <li><?php echo t('Toggle RTL mode') ?> = <strong>z</strong></li>
<li><?php echo t('Show help') ?> = <strong>?</strong></li> <li><?php echo t('Show help') ?> = <strong>?</strong></li>
<li><?php echo t('Close help') ?> = <strong>q</strong></li> <li><?php echo t('Close help') ?> = <strong>q</strong></li>
<li><?php echo t('Search') ?> = <strong>/</strong></li>
</ul> </ul>
</div> </div>

View File

@ -825,7 +825,7 @@ iframe {
top: 0; top: 0;
left: 0; left: 0;
bottom: 0; bottom: 0;
width: 300px; width: 350px;
overflow: auto; overflow: auto;
background: #f0f0f0; background: #f0f0f0;
box-shadow: 2px 0 5px 0 #ccc; box-shadow: 2px 0 5px 0 #ccc;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -251,20 +251,10 @@ Miniflux.Event = (function() {
case 39: case 39:
Miniflux.Nav.SelectNextItem(); Miniflux.Nav.SelectNextItem();
break; break;
}
};
document.onkeyup = function(e) {
if (isEventIgnored(e)) {
return;
}
Miniflux.Event.lastEventType = "keyboard";
switch (e.key || e.which) {
case '/': case '/':
case 47: case 191:
e.preventDefault();
e.stopPropagation();
Miniflux.Nav.ShowSearch(); Miniflux.Nav.ShowSearch();
break; break;
} }