I came to bring the rain.. Let me get my coat... Fix focus on timeslider import export

This commit is contained in:
John McLear 2015-03-31 15:00:43 +01:00
parent 73073dcbc1
commit 24e6e1728a
3 changed files with 33 additions and 10 deletions

View file

@ -78,6 +78,7 @@
width: 44px; width: 44px;
text-align:center; text-align:center;
vertical-align:middle; vertical-align:middle;
background:none;
} }
#playpause_button { #playpause_button {
right: 77px; right: 77px;
@ -125,7 +126,7 @@
font-family: fontawesome-etherpad; font-family: fontawesome-etherpad;
border-radius:2px; border-radius:2px;
border: #666 solid 1px; border: #666 solid 1px;
line-height:18px; /* line-height:18px; */
text-align:center; text-align:center;
height:22px; height:22px;
color:#666; color:#666;
@ -337,3 +338,19 @@ OL {
.list-number6 { .list-number6 {
list-style-type: lower-roman list-style-type: lower-roman
} }
button{
margin:0;
padding:0;
cursor:pointer;
}
button::-moz-focus-inner {
padding: 0;
border: 0
}
button:focus{
border: 1px solid #666;
}

View file

@ -308,9 +308,6 @@ var padeditbar = (function()
var editbarPosition = 0; var editbarPosition = 0;
function bodyKeyEvent(evt){ function bodyKeyEvent(evt){
// Check we're on a pad and not on the timeslider
// Or some other window I haven't thought about!
if(typeof pad === 'undefined') return false;
// If the event is Alt F9 or Escape & we're already in the editbar menu // If the event is Alt F9 or Escape & we're already in the editbar menu
// Send the users focus back to the pad // Send the users focus back to the pad
@ -319,6 +316,10 @@ var padeditbar = (function()
// Close any dropdowns we have open.. // Close any dropdowns we have open..
padeditbar.toggleDropDown("none"); padeditbar.toggleDropDown("none");
// Check we're on a pad and not on the timeslider
// Or some other window I haven't thought about!
if(typeof pad === 'undefined') return false;
// Shift focus away from any drop downs // Shift focus away from any drop downs
$(':focus').blur(); // required to do not try to remove! $(':focus').blur(); // required to do not try to remove!
padeditor.ace.focus(); // Sends focus back to pad padeditor.ace.focus(); // Sends focus back to pad
@ -366,9 +367,14 @@ var padeditbar = (function()
toolbar.registerCommand("import_export", function () { toolbar.registerCommand("import_export", function () {
toolbar.toggleDropDown("import_export", function(){ toolbar.toggleDropDown("import_export", function(){
setTimeout(function(){ // If Import file input exists then focus on it..
$('#importfileinput').focus(); if($('#importfileinput').length !== 0){
}, 100); setTimeout(function(){
$('#importfileinput').focus();
}, 100);
}else{
$('.exportlink').first().focus();
}
}); });
}); });

View file

@ -61,11 +61,11 @@
<div id="ui-slider-bar"></div> <div id="ui-slider-bar"></div>
</div> </div>
<div id="playpause_button"> <div id="playpause_button">
<div id="playpause_button_icon" class=""></div> <button id="playpause_button_icon" class=""></button>
</div> </div>
<div id="steppers"> <div id="steppers">
<div class="stepper" id="leftstep"></div> <button class="stepper" id="leftstep"></button>
<div class="stepper" id="rightstep"></div> <button class="stepper" id="rightstep"></button>
</div> </div>
</div> </div>