Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

Commit

Permalink
Improved keyboard selection
Browse files Browse the repository at this point in the history
for gallery inline results
  • Loading branch information
zhukov committed Feb 10, 2016
1 parent 87a8e6c commit b88c215
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
19 changes: 15 additions & 4 deletions app/less/app.less
Original file line number Diff line number Diff line change
Expand Up @@ -3117,16 +3117,16 @@ a.composer_command_option:hover .composer_command_desc,

.user-select(text);

&:empty:before {
&:empty::before {
content: attr(placeholder);
color: #9aa2ab;
display: block;
margin-top: -1px;
margin-left: 1px;
pointer-events: none;
}
&:empty:active:before,
&:empty:focus:before {
&:empty:active::before,
&:empty:focus::before {
opacity: 0.75;
}

Expand Down Expand Up @@ -3279,14 +3279,25 @@ _:-ms-lang(x), .composer_rich_textarea:empty:focus:before {
}
}


.composer_dropdown > li.inline_result_gif > a,
.composer_dropdown > li.inline_result_photo > a {
padding: 0;
line-height: 0;
display: block;
overflow: hidden;
}
li.inline_result_gif.composer_autocomplete_option_active a,
li.inline_result_photo.composer_autocomplete_option_active a {
position: relative;

.inline_result_ind {
display: block;
background: rgba(255,255,255,0.3);
width: 100%;
height: 100%;
position: absolute;
}
}
.inline_result_gif .img_gif_video,
.inline_result_photo .inline_result_photo_image {
object-fit: cover;
Expand Down
3 changes: 3 additions & 0 deletions app/partials/desktop/inline_results.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<li class="inline_result_wrap" ng-class="'inline_result_' + result.type" ng-repeat="result in botResults.results track by result.qID" ng-switch="result.type">

<a ng-switch-when="gif" class="img_gif_with_progress_wrap" data-inlineid="{{result.qID}}" ng-style="::{width: result.thumbW, height: result.thumbH}" ng-switch="result._">
<div class="inline_result_ind"></div>
<div ng-switch-when="botInlineMediaResultDocument" ng-switch="result.document.url !== undefined" class="inline_result_gif_mtproto">
<div ng-switch-when="true" ng-switch="result.document.mime_type == 'video/mp4'">
<video ng-switch-when="true" width="{{result.thumbW}}" height="{{result.thumbH}}" loop autoplay class="img_gif_video">
Expand All @@ -25,11 +26,13 @@
</a>

<a ng-switch-when="photo" data-inlineid="{{result.qID}}" ng-style="::{width: result.thumbW, height: result.thumbH}" ng-switch="result._">
<div class="inline_result_ind"></div>
<div ng-switch-when="botInlineMediaResultPhoto" class="inline_result_photo_mtproto">
<img
class="inline_result_photo_image"
my-load-thumb
thumb="result.thumb"
ng-style="::{width: result.thumbW, height: result.thumbH}"
/>
</div>
<div ng-switch-default ng-switch="result.contentUrl !== undefined" class="inline_result_photo_http">
Expand Down

0 comments on commit b88c215

Please sign in to comment.