Closed jackrosenthal closed 7 years ago
To add to this, do we really need that fancy input box selection thing? I was thinking a <tt>
would have been sufficent...
Last thing, ${tg.request.url + '.ics'}
is a little bit convoluted... why aren't you just using the canonical tg.url
?
All of this is by design. This is how the "clone" button works on GitHub. When you click on the text box, the contents are selected but not added to the clipboard. The button on the right of the text box (the copy button) will select the contents of the textbox and copy it to the clipboard.
A simple <tt>
will not cut it. Browser support for selecting text that is not inside a textbox is pretty bad (all the APIs are different and not very good). Also, to enable the "Copy" button, it is easiest to use a textbox.
Lastly, tg.url
did not work because tg.url('/schedule.ics')
gave a result of /schedule.ics
, a relative path. What we need is the full URL (<site_base>/schedule.ics
) and the only way I found to do this is use tg.request.url
. I'm open to other suggestions, but tg.url
won't work.
Fixed... When you fix your implementation to not be confusing that it was not put in the selection buffer, we can use it.
Now it's worse. I now have to manually select the text to copy it to my clipboard.
Most operating systems let you triple-click to do that.
That only selects it, I still have to Ctrl + C
to copy it to my clipboard.
Your point is...?
If you don't like that your OS requires you to press Ctrl-C
to copy, then consider an operating system which has a different way to copy. As a web developer, it is not your responsibility to implement your own non-standard OS controls, no matter how inconvenient it is on some systems.
The attribute
onclick="this.select()"
on the iCalendar link selection box causes the text to appear selected in the browser, but since it was not selected using the mouse, it is not added to X selection buffer.This attribute should be removed to prevent confusion.