Merge pull request #16454 from nextcloud/bugfix/noid/sharelink-shouldnt-open-menu-automatically

Dont show menu automatically when share link is clicked
This commit is contained in:
Roeland Jago Douma 2019-09-04 10:36:04 +02:00 committed by GitHub
commit 2fdf946dae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 2 additions and 15 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -243,11 +243,6 @@
if (newShareId) { if (newShareId) {
var shares = self.$el.find('li[data-share-id]'); var shares = self.$el.find('li[data-share-id]');
var $newShare = self.$el.find('li[data-share-id="'+newShareId+'"]'); var $newShare = self.$el.find('li[data-share-id="'+newShareId+'"]');
// only open the menu by default if this is the first share
if ($newShare && shares.length === 1) {
var $menu = $newShare.find('.popovermenu');
OC.showMenu(null, $menu);
}
} }
}, },
error: function() { error: function() {

View File

@ -249,14 +249,6 @@ class FilesAppSharingContext implements Context, ActorAwareInterface {
$this->actor->find(FileListContext::shareActionForFile(FilesAppContext::currentSectionMainView(), $fileName), 10)->click(); $this->actor->find(FileListContext::shareActionForFile(FilesAppContext::currentSectionMainView(), $fileName), 10)->click();
$this->actor->find(self::shareLinkAddNewButton(), 5)->click(); $this->actor->find(self::shareLinkAddNewButton(), 5)->click();
// Wait until the menu was opened after the share creation to continue.
if (!WaitFor::elementToBeEventuallyShown(
$this->actor,
self::shareLinkMenu(),
$timeout = 5 * $this->actor->getFindTimeoutMultiplier())) {
PHPUnit_Framework_Assert::fail("The share link menu is not open yet after $timeout seconds");
}
} }
/** /**