Skip to content

Don't automatically save generated file to clipboard - #28

Merged
EdOverflow merged 4 commits into
securitytxt:masterfrom
joker314:feat/no-auto-clipboard
Mar 8, 2019
Merged

EdOverflow merged 4 commits into
securitytxt:masterfrom
joker314:feat/no-auto-clipboard

Conversation

@joker314

@joker314 joker314 commented Mar 2, 2019

Copy link
Copy Markdown
Contributor

This pull request makes two three changes:

  • Don't copy security.txt files to the clipboard, instead output them to a visible read-only textbox with a button that allows copying to the clipboard
  • Once the form is submitted, scroll that textbox into view
  • Make all the tabs consistent (four, not two, since I think it was originally four - spaces)

I looked at the level of support for scrollIntoView. Most browsers support it when the first argument is a Boolean. However, I'm passing an object so that the scrolling is smooth. I think it is very likely (but am not certain) that these older browsers will still scroll the element into view, even if they don't scroll smoothly.

I haven't added anything to handle browsers which don't support scrollIntoView. Should I? (I'd be happy to do so) 8eb8d28 will use the hash component of URLs to scroll to the relevant location as a fallback.

@joker314

joker314 commented Mar 2, 2019

Copy link
Copy Markdown
Contributor Author

Alright, I've added changes in 8eb8d28 which should keep the website compatible with very old browsers.

@EdOverflow
EdOverflow merged commit 813fda6 into securitytxt:master Mar 8, 2019
@EdOverflow

Copy link
Copy Markdown
Member

Thank you, @joker314.

@joker314
joker314 deleted the feat/no-auto-clipboard branch March 8, 2019 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants