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