mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-20 18:18:56 +00:00
fix(view) onAfterShow: only when click on overlay
This commit is contained in:
parent
9e6d235cb7
commit
0e127ed1dc
1 changed files with 4 additions and 3 deletions
|
|
@ -218,15 +218,16 @@ var CloudCmd, Util, DOM, CloudFunc, $;
|
|||
}
|
||||
|
||||
function onAfterShow() {
|
||||
var overlay = DOM.getByClass('fancybox-overlay'),
|
||||
var NAME = 'fancybox-overlay',
|
||||
overlay = DOM.getByClass(NAME),
|
||||
onOverLayClick = function() {
|
||||
var isCurrent,
|
||||
position = CloudCmd.MousePosition,
|
||||
element = document.elementFromPoint(position.x, position.y),
|
||||
classList = element.classList,
|
||||
isInner = classList.contains('fancybox-inner');
|
||||
isOverlay = classList.contains(NAME);
|
||||
|
||||
if (!isInner) {
|
||||
if (isOverlay) {
|
||||
DOM.hide(overlay);
|
||||
element = DOM.getCurrentByPosition(position);
|
||||
isCurrent = DOM.isCurrentFile(element);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue