mirror of
https://github.com/discourse/discourse.git
synced 2025-01-19 08:32:45 +08:00
FIX: tag chooser input was navigating to tag pgaes on some mobile browsers
This commit is contained in:
parent
44ddc113e7
commit
b5cc6851cf
|
@ -1,7 +1,7 @@
|
|||
import renderTag from 'discourse/lib/render-tag';
|
||||
|
||||
function formatTag(t) {
|
||||
return renderTag(t.id, {count: t.count});
|
||||
return renderTag(t.id, {count: t.count, noHref: true});
|
||||
}
|
||||
|
||||
export default Ember.TextField.extend({
|
||||
|
@ -96,7 +96,7 @@ export default Ember.TextField.extend({
|
|||
list.push(item);
|
||||
},
|
||||
formatSelection(data) {
|
||||
return data ? renderTag(this.text(data)) : undefined;
|
||||
return data ? renderTag(this.text(data), {noHref: true}) : undefined;
|
||||
},
|
||||
formatSelectionCssClass() {
|
||||
return "discourse-tag-select2";
|
||||
|
|
|
@ -5,7 +5,7 @@ export default function renderTag(tag, params) {
|
|||
tag = Handlebars.Utils.escapeExpression(tag);
|
||||
const classes = ['tag-' + tag, 'discourse-tag'];
|
||||
const tagName = params.tagName || "a";
|
||||
const href = tagName === "a" ? " href='" + Discourse.getURL("/tags/" + tag) + "' " : "";
|
||||
const href = (tagName === "a" && !params.noHref) ? " href='" + Discourse.getURL("/tags/" + tag) + "' " : "";
|
||||
|
||||
if (Discourse.SiteSettings.tag_style || params.style) {
|
||||
classes.push(params.style || Discourse.SiteSettings.tag_style);
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
|
||||
{{plugin-outlet name="edit-topic" args=(hash model=model buffered=buffered)}}
|
||||
|
||||
<br>
|
||||
{{d-button action="finishedEditingTopic" class="btn-primary btn-small submit-edit" icon="check"}}
|
||||
{{d-button action="cancelEditingTopic" class="btn-small cancel-edit" icon="times"}}
|
||||
{{else}}
|
||||
|
|
Loading…
Reference in New Issue
Block a user