From a3e9819158b1b03a66b73fb1b5697b9bc60fef48 Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Tue, 22 Aug 2017 19:41:02 +0200 Subject: [PATCH] FEATURE: allows to disable automaticPositioning of emoji-picker (#5074) Usage: {{emoji-picker automaticPositioning=false}} --- .../javascripts/discourse/components/emoji-picker.js.es6 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/components/emoji-picker.js.es6 b/app/assets/javascripts/discourse/components/emoji-picker.js.es6 index 08d54417582..6cbdafe7941 100644 --- a/app/assets/javascripts/discourse/components/emoji-picker.js.es6 +++ b/app/assets/javascripts/discourse/components/emoji-picker.js.es6 @@ -21,6 +21,8 @@ export function resetCache() { let $picker, $filter, $results, $list, scrollPosition, $visibleSections, _checkTimeout; export default Ember.Component.extend({ + automaticPositioning: true, + willDestroyElement() { this._super(); @@ -448,7 +450,7 @@ export default Ember.Component.extend({ $picker.css(_.merge(attributes, options)); }; - if(Ember.testing) { + if(Ember.testing || this.get("automaticPositioning") === false) { desktopPositioning(); return; }