Skip to content

Commit

Permalink
Don't let repo clone URL overflow (#19517)
Browse files Browse the repository at this point in the history
- Apparently `<input>` elements differ from other elements have a size
attribute that act as a `min-width` CSS property, this causes a overflow
on mobile. By setting this size to `1` it doesn't try to force a
min-width and nicely shrink down.
  • Loading branch information
Gusted authored Apr 26, 2022
1 parent cdab462 commit 3fbaa79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/repo/clone_buttons.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</button>
{{end}}
<!-- the value will be updated by initRepoCloneLink, the code below is used to avoid UI flicking -->
<input id="repo-clone-url" value="" readonly>
<input id="repo-clone-url" value="" size="1" readonly>
<script>
(() => {
const proto = localStorage.getItem('repo-clone-protocol') || 'https';
Expand Down

0 comments on commit 3fbaa79

Please sign in to comment.