cypress_test/integration_tests/mobile/styles_spec.js | 15 +++++++-------- loleaflet/src/control/Control.MobileWizard.js | 3 ++- 2 files changed, 9 insertions(+), 9 deletions(-)
New commits: commit 8c9ef8db4cc9652fd3c4018a34e5c2a96425a699 Author: Tamás Zolnai <tamas.zol...@collabora.com> AuthorDate: Tue Feb 4 11:41:04 2020 +0100 Commit: Tamás Zolnai <tamas.zol...@collabora.com> CommitDate: Tue Feb 4 13:15:12 2020 +0100 mobile: Hide new style button on mobile wizard. It opens a tunneled dialog, what we try to avoid on mobile. Also after the recent focus related changes this dialog can't get the focus, so can't add the name of the new style. Even if I workround this focus issue and I manage to add a new style, then that style won't be part of the style list displayed on the mobile wizard. All in all adding new style does not work now, so better to hide this item. Change-Id: I35c3686129621656f3f63914c9590248f320c15d Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87965 Reviewed-by: Tamás Zolnai <tamas.zol...@collabora.com> Tested-by: Tamás Zolnai <tamas.zol...@collabora.com> diff --git a/cypress_test/integration_tests/mobile/styles_spec.js b/cypress_test/integration_tests/mobile/styles_spec.js index 483ba33cb..b2671650e 100644 --- a/cypress_test/integration_tests/mobile/styles_spec.js +++ b/cypress_test/integration_tests/mobile/styles_spec.js @@ -133,19 +133,18 @@ describe('Apply/modify styles.', function() { .should('exist'); }); - it('Add new style.', function() { - // Do a new selection - helper.selectAllMobile(); + it('New style item is hidden.', function() { + // New style item opens a tunneled dialog + // what we try to avoid. // Open mobile wizard cy.get('#tb_actionbar_item_mobile_wizard') .click(); - cy.get('#StyleNewByExample') - .click(); - - // We have a dialog here?! - cy.get('.lokdialog_canvas') + cy.get('#StyleUpdateByExample') .should('exist'); + + cy.get('#StyleNewByExample') + .should('not.exist'); }); }); diff --git a/loleaflet/src/control/Control.MobileWizard.js b/loleaflet/src/control/Control.MobileWizard.js index 32a96e859..249a33421 100644 --- a/loleaflet/src/control/Control.MobileWizard.js +++ b/loleaflet/src/control/Control.MobileWizard.js @@ -348,7 +348,7 @@ L.Control.MobileWizard = L.Control.extend({ deck.children[textIdx].children[0].children = moveContent.concat(deck.children[textIdx].children[0].children); deck.children.splice(stylesIdx, 1); //remove the styles property } - this._removeItems(deck, ['cellbordertype', 'borderlinestyle', 'borderlinecolor', 'editcontour', 'spacingbar', 'linespacing']); + this._removeItems(deck, ['cellbordertype', 'borderlinestyle', 'borderlinecolor', 'editcontour', 'spacingbar', 'linespacing', 'stylenew']); } }, @@ -382,6 +382,7 @@ L.Control.MobileWizard = L.Control.extend({ if (data.children[i].id === items[j]) { data.children.splice(i, 1); childRemoved = true; + break; } } if (childRemoved && i > 0) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits