diff --git a/app/assets/javascripts/exercise.ts b/app/assets/javascripts/exercise.ts index 7f3e37a7da..8d1ce046fc 100644 --- a/app/assets/javascripts/exercise.ts +++ b/app/assets/javascripts/exercise.ts @@ -115,11 +115,12 @@ function initMathJax(): void { function initCodeFragments(): void { const codeElements = document.querySelectorAll("pre code"); codeElements.forEach((codeElement: HTMLElement) => { + const wrapper = codeElement.parentElement; + wrapper.classList.add("code-wrapper"); const copyButton = new CopyButton(); copyButton.codeElement = codeElement; - render(copyButton, codeElement.parentElement, { renderBefore: codeElement }); - initTooltips(codeElement); + render(copyButton, wrapper, { renderBefore: codeElement }); }); } diff --git a/app/assets/stylesheets/models/activities.css.scss b/app/assets/stylesheets/models/activities.css.scss index da0e9512ae..ddf7aa4caf 100644 --- a/app/assets/stylesheets/models/activities.css.scss +++ b/app/assets/stylesheets/models/activities.css.scss @@ -192,8 +192,15 @@ center img { } } -pre { +.code-wrapper { position: relative; + overflow: hidden; + + code { + overflow: auto; + width: 100%; + display: block; + } d-copy-button { position: absolute; diff --git a/config/initializers/00_version.rb b/config/initializers/00_version.rb index 3bf7e701dc..9671b53d9c 100644 --- a/config/initializers/00_version.rb +++ b/config/initializers/00_version.rb @@ -2,8 +2,8 @@ module Dodona class Application module Version MAJOR = 6 - MINOR = 6 - PATCH = 10 + MINOR = 7 + PATCH = 0 STRING = [MAJOR, MINOR, PATCH].compact.join('.') end