mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 10:50:26 -06:00
Merge pull request #3831 from tgxworld/fix_emoji_toolbar
UX: Emoji toolbar on mobile.
This commit is contained in:
commit
af7d51e923
@ -130,10 +130,13 @@ export default function(options) {
|
||||
if (options.transformComplete) {
|
||||
term = options.transformComplete(term);
|
||||
}
|
||||
var text = me.val();
|
||||
text = text.substring(0, completeStart) + (options.key || "") + term + ' ' + text.substring(completeEnd + 1, text.length);
|
||||
me.val(text);
|
||||
Discourse.Utilities.setCaretPosition(me[0], completeStart + 1 + term.length);
|
||||
|
||||
if (term) {
|
||||
var text = me.val();
|
||||
text = text.substring(0, completeStart) + (options.key || "") + term + ' ' + text.substring(completeEnd + 1, text.length);
|
||||
me.val(text);
|
||||
Discourse.Utilities.setCaretPosition(me[0], completeStart + 1 + term.length);
|
||||
}
|
||||
}
|
||||
}
|
||||
closeAutocomplete();
|
||||
|
@ -236,6 +236,8 @@ var showSelector = function(options) {
|
||||
closeSelector();
|
||||
});
|
||||
|
||||
if (Discourse.Mobile.mobileView) PER_ROW = 9;
|
||||
|
||||
var page = parseInt(localStorage.emojiPage) || 0;
|
||||
var offset = parseInt(localStorage.emojiOffset) || 0;
|
||||
render(page, offset, options);
|
||||
|
@ -9,10 +9,9 @@ body img.emoji {
|
||||
}
|
||||
|
||||
.emoji-modal {
|
||||
@include transform(translate(-50%, -50%));
|
||||
z-index: 10000;
|
||||
position: fixed;
|
||||
margin-left: -195px;
|
||||
margin-top: -100px;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
background-color: dark-light-choose(#dadada, blend-primary-secondary(5%));
|
||||
|
@ -20,6 +20,7 @@
|
||||
@import "mobile/directory";
|
||||
@import "mobile/menu-panel";
|
||||
@import "mobile/search";
|
||||
@import "mobile/emoji";
|
||||
|
||||
/* These files doesn't actually exist, they are injected by DiscourseSassImporter. */
|
||||
|
||||
|
3
app/assets/stylesheets/mobile/emoji.scss
Normal file
3
app/assets/stylesheets/mobile/emoji.scss
Normal file
@ -0,0 +1,3 @@
|
||||
.emoji-table-wrapper {
|
||||
min-width: 320px;
|
||||
}
|
Loading…
Reference in New Issue
Block a user