mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 08:22:07 +02:00
MDL-68256 task admin UI: Grrrr! browsers
This commit is contained in:
parent
b3f562176c
commit
9205d263d6
@ -182,8 +182,10 @@ class tool_task_renderer extends plugin_renderer_base {
|
||||
}
|
||||
$table->data = $data;
|
||||
if ($lastchanged) {
|
||||
// IE does not support this, and the ancient version of Firefox we use for Behat
|
||||
// has the method, but then errors on 'centre'. So, just try to scroll, and if it fails, don't care.
|
||||
$this->page->requires->js_init_code(
|
||||
'document.querySelector("tr.table-primary").scrollIntoView({block: "center"});');
|
||||
'try{document.querySelector("tr.table-primary").scrollIntoView({block: "center"});}catch(e){}');
|
||||
}
|
||||
return html_writer::table($table);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user