Преглед на файлове

fix: floating comment-on-selection covers the raw PTY terminal too, not just the legacy entry log

clanker преди 1 месец
родител
ревизия
2906a94cc5
променени са 1 файла, в които са добавени 9 реда и са изтрити 2 реда
  1. 9 2
      src/pages/task_terminal.html

+ 9 - 2
src/pages/task_terminal.html

@@ -13,10 +13,17 @@
                 statum.addStateListener('terminal', function () {
                     var state = statum.read('terminal');
                     if (!connected && state && state.exists && state.session_id > 0) {
-                        if (window.initQuoteComments && !state.has_raw_log) {
+                        // Floating "comment on selection" covers both
+                        // terminal flavours: the raw PTY log (#term-raw) and
+                        // the legacy entry log (#term-log).
+                        if (window.initQuoteComments) {
                             window.initQuoteComments({
                                 matches: function (node) {
-                                    return node.closest && node.closest('#term-log') != null;
+                                    if (!node.closest) {
+                                        return false;
+                                    }
+                                    return node.closest('#term-log') != null
+                                        || node.closest('#term-raw') != null;
                                 },
                                 action: function () { return state.comment; }
                             });