Fossil SCM
/chat links now open in a new tab by default. Reduced min-width of input field to help out FF on Android.
Commit
cea66528e281cbd8fa85c48a7712ea878dfbcfd72cb5db769e63c194301f63fd
Parent
6c1ac839e3591d0…
2 files changed
+2
+3
-2
+2
| --- src/chat.js | ||
| +++ src/chat.js | ||
| @@ -668,10 +668,11 @@ | ||
| 668 | 668 | '-',pad2(d.getDate()), |
| 669 | 669 | ' ',pad2(d.getHours()),':',pad2(d.getMinutes()), |
| 670 | 670 | ':',pad2(d.getSeconds()) |
| 671 | 671 | ].join(''); |
| 672 | 672 | }; |
| 673 | + const addAnchorTargetBlank = (e)=>D.attr(e, 'target','_blank'); | |
| 673 | 674 | cf.prototype = { |
| 674 | 675 | scrollIntoView: function(){ |
| 675 | 676 | this.e.content.scrollIntoView(); |
| 676 | 677 | }, |
| 677 | 678 | setMessage: function(m){ |
| @@ -744,10 +745,11 @@ | ||
| 744 | 745 | if(m.xmsg instanceof Array){ |
| 745 | 746 | // Used by Chat.reportErrorAsMessage() |
| 746 | 747 | D.append(contentTarget, m.xmsg); |
| 747 | 748 | }else{ |
| 748 | 749 | contentTarget.innerHTML = m.xmsg; |
| 750 | + contentTarget.querySelectorAll('a').forEach(addAnchorTargetBlank); | |
| 749 | 751 | if(F.pikchr){ |
| 750 | 752 | F.pikchr.addSrcView(contentTarget.querySelectorAll('svg.pikchr')); |
| 751 | 753 | } |
| 752 | 754 | } |
| 753 | 755 | } |
| 754 | 756 |
| --- src/chat.js | |
| +++ src/chat.js | |
| @@ -668,10 +668,11 @@ | |
| 668 | '-',pad2(d.getDate()), |
| 669 | ' ',pad2(d.getHours()),':',pad2(d.getMinutes()), |
| 670 | ':',pad2(d.getSeconds()) |
| 671 | ].join(''); |
| 672 | }; |
| 673 | cf.prototype = { |
| 674 | scrollIntoView: function(){ |
| 675 | this.e.content.scrollIntoView(); |
| 676 | }, |
| 677 | setMessage: function(m){ |
| @@ -744,10 +745,11 @@ | |
| 744 | if(m.xmsg instanceof Array){ |
| 745 | // Used by Chat.reportErrorAsMessage() |
| 746 | D.append(contentTarget, m.xmsg); |
| 747 | }else{ |
| 748 | contentTarget.innerHTML = m.xmsg; |
| 749 | if(F.pikchr){ |
| 750 | F.pikchr.addSrcView(contentTarget.querySelectorAll('svg.pikchr')); |
| 751 | } |
| 752 | } |
| 753 | } |
| 754 |
| --- src/chat.js | |
| +++ src/chat.js | |
| @@ -668,10 +668,11 @@ | |
| 668 | '-',pad2(d.getDate()), |
| 669 | ' ',pad2(d.getHours()),':',pad2(d.getMinutes()), |
| 670 | ':',pad2(d.getSeconds()) |
| 671 | ].join(''); |
| 672 | }; |
| 673 | const addAnchorTargetBlank = (e)=>D.attr(e, 'target','_blank'); |
| 674 | cf.prototype = { |
| 675 | scrollIntoView: function(){ |
| 676 | this.e.content.scrollIntoView(); |
| 677 | }, |
| 678 | setMessage: function(m){ |
| @@ -744,10 +745,11 @@ | |
| 745 | if(m.xmsg instanceof Array){ |
| 746 | // Used by Chat.reportErrorAsMessage() |
| 747 | D.append(contentTarget, m.xmsg); |
| 748 | }else{ |
| 749 | contentTarget.innerHTML = m.xmsg; |
| 750 | contentTarget.querySelectorAll('a').forEach(addAnchorTargetBlank); |
| 751 | if(F.pikchr){ |
| 752 | F.pikchr.addSrcView(contentTarget.querySelectorAll('svg.pikchr')); |
| 753 | } |
| 754 | } |
| 755 | } |
| 756 |
+3
-2
| --- src/style.chat.css | ||
| +++ src/style.chat.css | ||
| @@ -223,10 +223,11 @@ | ||
| 223 | 223 | margin-bottom: 0.25em; |
| 224 | 224 | align-items: stretch; |
| 225 | 225 | } |
| 226 | 226 | body.chat #chat-input-line.single-line { |
| 227 | 227 | flex-wrap: wrap; |
| 228 | + margin-bottom: 0.25em; | |
| 228 | 229 | } |
| 229 | 230 | body.chat #chat-edit-buttons { |
| 230 | 231 | display: flex; |
| 231 | 232 | flex-direction: column; |
| 232 | 233 | justify-content: space-between; |
| @@ -246,13 +247,13 @@ | ||
| 246 | 247 | margin: 0 0 0 0.25em; |
| 247 | 248 | max-width: 2em; |
| 248 | 249 | } |
| 249 | 250 | body.chat #chat-input-line > input[type=text], |
| 250 | 251 | body.chat #chat-input-line > textarea { |
| 251 | - flex: 5 1 auto; | |
| 252 | + flex: 2 1 auto; | |
| 252 | 253 | max-width: revert; |
| 253 | - min-width: 24em; | |
| 254 | + min-width: 16em; | |
| 254 | 255 | } |
| 255 | 256 | /* Widget holding the file selection control and preview */ |
| 256 | 257 | body.chat #chat-input-file-area { |
| 257 | 258 | display: flex; |
| 258 | 259 | flex-direction: row; |
| 259 | 260 |
| --- src/style.chat.css | |
| +++ src/style.chat.css | |
| @@ -223,10 +223,11 @@ | |
| 223 | margin-bottom: 0.25em; |
| 224 | align-items: stretch; |
| 225 | } |
| 226 | body.chat #chat-input-line.single-line { |
| 227 | flex-wrap: wrap; |
| 228 | } |
| 229 | body.chat #chat-edit-buttons { |
| 230 | display: flex; |
| 231 | flex-direction: column; |
| 232 | justify-content: space-between; |
| @@ -246,13 +247,13 @@ | |
| 246 | margin: 0 0 0 0.25em; |
| 247 | max-width: 2em; |
| 248 | } |
| 249 | body.chat #chat-input-line > input[type=text], |
| 250 | body.chat #chat-input-line > textarea { |
| 251 | flex: 5 1 auto; |
| 252 | max-width: revert; |
| 253 | min-width: 24em; |
| 254 | } |
| 255 | /* Widget holding the file selection control and preview */ |
| 256 | body.chat #chat-input-file-area { |
| 257 | display: flex; |
| 258 | flex-direction: row; |
| 259 |
| --- src/style.chat.css | |
| +++ src/style.chat.css | |
| @@ -223,10 +223,11 @@ | |
| 223 | margin-bottom: 0.25em; |
| 224 | align-items: stretch; |
| 225 | } |
| 226 | body.chat #chat-input-line.single-line { |
| 227 | flex-wrap: wrap; |
| 228 | margin-bottom: 0.25em; |
| 229 | } |
| 230 | body.chat #chat-edit-buttons { |
| 231 | display: flex; |
| 232 | flex-direction: column; |
| 233 | justify-content: space-between; |
| @@ -246,13 +247,13 @@ | |
| 247 | margin: 0 0 0 0.25em; |
| 248 | max-width: 2em; |
| 249 | } |
| 250 | body.chat #chat-input-line > input[type=text], |
| 251 | body.chat #chat-input-line > textarea { |
| 252 | flex: 2 1 auto; |
| 253 | max-width: revert; |
| 254 | min-width: 16em; |
| 255 | } |
| 256 | /* Widget holding the file selection control and preview */ |
| 257 | body.chat #chat-input-file-area { |
| 258 | display: flex; |
| 259 | flex-direction: row; |
| 260 |