mirror of
https://github.com/flarum/framework.git
synced 2025-02-21 03:59:39 +08:00
Don't show quote button until after selection has been made
This commit is contained in:
parent
18a4b6d4b1
commit
de7d450093
@ -311,8 +311,6 @@ System.register('flarum/mentions/addComposerAutocomplete', ['flarum/extend', 'fl
|
||||
|
||||
return {
|
||||
setters: [function (_flarumExtend) {
|
||||
/*global getCaretCoordinates*/
|
||||
|
||||
extend = _flarumExtend.extend;
|
||||
}, function (_flarumComponentsComposerBody) {
|
||||
ComposerBody = _flarumComponentsComposerBody.default;
|
||||
@ -681,7 +679,10 @@ System.register('flarum/mentions/addPostQuoteButton', ['flarum/extend', 'flarum/
|
||||
};
|
||||
|
||||
this.$().after($container).on('mouseup', handler);
|
||||
document.addEventListener('selectionchange', handler, false);
|
||||
|
||||
if ('ontouchstart' in window) {
|
||||
document.addEventListener('selectionchange', handler, false);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -37,6 +37,9 @@ export default function addPostQuoteButton() {
|
||||
};
|
||||
|
||||
this.$().after($container).on('mouseup', handler);
|
||||
document.addEventListener('selectionchange', handler, false);
|
||||
|
||||
if ('ontouchstart' in window) {
|
||||
document.addEventListener('selectionchange', handler, false);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user