Fixes issue where dragging panel resizer would highlight tag text on Safari

This commit is contained in:
Mo Bitar
2019-04-13 12:31:08 -05:00
parent 1103400a95
commit 23baf95b88
2 changed files with 16 additions and 6 deletions

View File

@@ -51,7 +51,7 @@
transition: height .1s ease-in-out;
position: relative;
> .info {
> .tag-info {
height: 20px;
> .title {
@@ -65,6 +65,14 @@
text-overflow: ellipsis;
width: 75%;
// Required for Safari to avoid highlighting when dragging panel resizers
// Make sure to undo if it's selected (for editing)
-webkit-user-select: none;
&.editing {
-webkit-user-select: text !important;
}
pointer-events: none;
}
@@ -96,8 +104,10 @@
}
&.selected {
> .title {
cursor: text;
> .tag-info {
.title {
cursor: text;
}
}
}

View File

@@ -16,7 +16,7 @@
.infinite-scroll
.tag{"ng-repeat" => "tag in ctrl.smartTags", "ng-click" => "ctrl.selectTag(tag)",
"ng-class" => "{'selected' : ctrl.selectedTag == tag, 'faded' : !tag.content.isAllTag}"}
.info
.tag-info
%input.title{"ng-disabled" => "true", "ng-model" => "tag.title"}
.count{"ng-show" => "tag.content.isAllTag"} {{tag.cachedNoteCount}}
@@ -25,8 +25,8 @@
.sk-h3.title
%span.sk-bold Tags
.tag{"ng-repeat" => "tag in ctrl.tags track by tag.uuid", "ng-click" => "ctrl.selectTag(tag)", "ng-class" => "{'selected' : ctrl.selectedTag == tag}"}
.info
%input.title{"ng-attr-id" => "tag-{{tag.uuid}}", "ng-click" => "ctrl.selectTag(tag)", "ng-model" => "tag.title",
.tag-info
%input.title{"ng-class" => "{'editing' : ctrl.editingTag == tag}", "ng-attr-id" => "tag-{{tag.uuid}}", "ng-click" => "ctrl.selectTag(tag)", "ng-model" => "tag.title",
"ng-keyup" => "$event.keyCode == 13 && $event.target.blur()", "sn-autofocus" => "true", "should-focus" => "ctrl.newTag || ctrl.editingTag == tag",
"ng-change" => "ctrl.tagTitleDidChange(tag)", "ng-blur" => "ctrl.saveTag($event, tag)", "spellcheck" => "false"}
.count {{tag.cachedNoteCount}}