FEATURE: allows to disable automaticPositioning of emoji-picker (#5074)

Usage:
{{emoji-picker automaticPositioning=false}}
This commit is contained in:
Joffrey JAFFEUX 2017-08-22 19:41:02 +02:00 committed by GitHub
parent ce8030716f
commit a3e9819158
1 changed files with 3 additions and 1 deletions

View File

@ -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;
}