1
0
mirror of https://github.com/flarum/core.git synced 2025-07-31 21:50:50 +02:00

Show permalink as a link on touch devices

This commit is contained in:
Toby Zerner
2015-03-04 12:27:43 +10:30
parent 7b47067d0f
commit 0759433ac0
3 changed files with 11 additions and 14 deletions

View File

@@ -24,7 +24,7 @@ export default Ember.Component.extend({
// When the dropdown menu is shown, select the contents of the permalink
// input so that the user can quickly copy the URL.
var component = this;
this.$('a').click(function() {
this.$('.dropdown-toggle').click(function() {
setTimeout(function() { component.$('.permalink').select(); }, 1);
});
@@ -32,5 +32,7 @@ export default Ember.Component.extend({
this.$('.permalink').click(function(e) {
e.stopPropagation();
});
this.set('touch', 'ontouchstart' in document.documentElement);
}
});