Bug Fix: Clicking on a Tag on the Mobile Tag view screen will no longer shrink the view

This commit is contained in:
Matthew Harrison-Jones 2013-09-16 08:59:10 +01:00
parent 8889be149b
commit 12d9d27327
2 changed files with 15 additions and 5 deletions

View File

@ -443,6 +443,8 @@ body.zen {
.extended-tags { // When the tag bar is exapanded
position: static;
min-height: 100%;
#entry-tags {
&:after {
right: 10px;
@ -487,6 +489,7 @@ body.zen {
height: 26px;
@include linear-gradient(left, rgba(26, 28, 29, 0.00), rgba(26, 28, 29, 1.00));
z-index: 9999;
pointer-events: none;
@include breakpoint($mobile) {
right: 176px;
@ -512,6 +515,7 @@ body.zen {
padding-bottom: 20px;
overflow-x: auto;
overflow-y: hidden;
-webkit-overflow-scrolling: touch;
white-space: nowrap;
@include transition(width 0.2s linear);
@ -520,6 +524,7 @@ body.zen {
display: block;
width: 115px;
max-width: inherit;
padding-bottom: 0;
}
}

View File

@ -1,6 +1,6 @@
// The Tag UI area associated with a post
/*global window, document, $, _, Backbone, Ghost */
/*global window, document, setTimeout, $, _, Backbone, Ghost */
(function () {
"use strict";
@ -84,14 +84,19 @@
});
}
$(".tag-input").one("blur", function () {
if (publishBar.hasClass("extended-tags")) {
$(".tag-input").one("blur", function (e) {
if (publishBar.hasClass("extended-tags") && !$(':hover').last().hasClass("tag")) {
publishBar.css("top", "auto").animate({"height": "40px"}, 300, "swing", function () {
$(this).removeClass("extended-tags");
$(document.activeElement).blur();
document.documentElement.style.display = "none";
setTimeout(function () { document.documentElement.style.display = 'block'; }, 0);
});
}
});
window.scrollTo(0, 1);
}
},
@ -220,11 +225,10 @@
},
handleTagClick: function (e) {
if (e) { e.stopPropagation(); }
var $tag = $(e.currentTarget),
tag = {id: $tag.data('tag-id'), name: $tag.text()};
$tag.remove();
window.scrollTo(0, 1);
this.model.removeTag(tag);
},
@ -265,6 +269,7 @@
var $tag = $('<span class="tag" data-tag-id="' + tag.id + '">' + tag.name + '</span>');
this.$('.tags').append($tag);
$(".tag").last()[0].scrollIntoView(true);
window.scrollTo(0, 1);
this.model.addTag(tag);
this.$('.tag-input').val('').focus();