Skip to content

Commit 04c4fbc

Browse files
committed
make article tabable
1 parent dd99d16 commit 04c4fbc

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

R/mod_document_code.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ mod_document_code_ui <- function(id) {
6767
tags$article(
6868
id = "article",
6969
class = "scrollable80",
70+
tabindex = 0,
7071
.noWS = "outside"
7172
),
7273
.noWS = "outside"

inst/app/www/document_code_js.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function getCaretCharacterOffsetWithin(element) {
3838

3939
function updateSelection() {
4040
var sel = window.getSelection();
41-
// if(window.getSelection().baseNode.parentNode.id != "document_code_ui_1-focal_text") return;
41+
if(window.getSelection().anchorNode.parentNode.closest('article') == null) return;
4242

4343
if(sel.rangeCount > 0){
4444
var range = sel.getRangeAt(0);

0 commit comments

Comments
 (0)