Skip to content

Commit

Permalink
4.1.1 release
Browse files Browse the repository at this point in the history
  • Loading branch information
nolimits4web committed Mar 14, 2019
1 parent b27ecb3 commit 268e6c6
Show file tree
Hide file tree
Showing 46 changed files with 185 additions and 105 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@

# Change Log

# [v4.1.1](https://github.com/framework7io/framework7/compare/v4.1.0...v4.1.1) - March 14, 2019
* Core
* Form
* Fix form ajax event arguments (`xhr` and `data`) to be in `e.detail`
* Panel
* Unset breakpoint layout on panel destroy
* Autocomplete
* Fixed issue with autcomplete dropdown click on iOS devices
* Router
* Fixed wrong behavior of navbar back link with swipe back in `ios` theme
* Cards
* Fixed issue when opened expanadble cards wasn't positioned correctly in some layouts
* Minor fixes

# [v4.1.0](https://github.com/framework7io/framework7/compare/v4.0.6...v4.1.0) - March 4, 2019
* Core
* Input
Expand Down
2 changes: 1 addition & 1 deletion packages/core/components/autocomplete.js

Large diffs are not rendered by default.

11 changes: 6 additions & 5 deletions packages/core/components/autocomplete/autocomplete-class.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,9 @@ class Autocomplete extends Framework7Class {
}
function onInputBlur() {
if (ac.$dropdownEl.find('label.active-state').length > 0) return;
ac.close();
setTimeout(() => {
ac.close();
}, 0);
}
function onResize() {
ac.positionDropdown();
Expand All @@ -206,7 +208,7 @@ class Autocomplete extends Framework7Class {
ac.$inputEl.blur();
}
}
function onDropdownclick() {
function onDropdownClick() {
const $clickedEl = $(this);
let clickedItem;
for (let i = 0; i < ac.items.length; i += 1) {
Expand All @@ -222,7 +224,6 @@ class Autocomplete extends Framework7Class {
}
ac.value = [clickedItem];
ac.emit('local::change autocompleteChange', [clickedItem]);

ac.close();
}

Expand Down Expand Up @@ -261,11 +262,11 @@ class Autocomplete extends Framework7Class {
}
};
ac.attachDropdownEvents = function attachDropdownEvents() {
ac.$dropdownEl.on('click', 'label', onDropdownclick);
ac.$dropdownEl.on('click', 'label', onDropdownClick);
app.on('resize', onResize);
};
ac.detachDropdownEvents = function detachDropdownEvents() {
ac.$dropdownEl.off('click', 'label', onDropdownclick);
ac.$dropdownEl.off('click', 'label', onDropdownClick);
app.off('resize', onResize);
};

Expand Down
2 changes: 1 addition & 1 deletion packages/core/components/card.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 20 additions & 4 deletions packages/core/components/card/card.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ const CardExpandable = {
if (prevented) return;

let $backropEl;
if (app.params.card.backrop) {
if ($cardEl.attr('data-backdrop-el')) {
$backropEl = $($cardEl.attr('data-backdrop-el'));
}
if (!$backropEl && app.params.card.backrop) {
$backropEl = $cardEl.parents('.page-content').find('.card-backdrop');
if (!$backropEl.length) {
$backropEl = $('<div class="card-backdrop"></div>');
Expand Down Expand Up @@ -82,8 +85,19 @@ const CardExpandable = {
let cardTopOffset;

if (hasTransform) {
cardLeftOffset = $cardEl[0].offsetLeft;
cardTopOffset = $cardEl[0].offsetTop - $cardEl.parents('.page-content')[0].scrollTop;
const transformValues = currTransform
.replace(/matrix\(|\)/g, '')
.split(',')
.map(el => el.trim());
if (transformValues && transformValues.length > 1) {
const scale = parseFloat(transformValues[0]);
cardLeftOffset = offset.left - cardWidth * (1 - scale) / 2;
cardTopOffset = offset.top - $pageEl.offset().top - cardHeight * (1 - scale) / 2;
if (app.rtl) cardLeftOffset -= $cardEl[0].scrollLeft;
} else {
cardLeftOffset = $cardEl[0].offsetLeft;
cardTopOffset = $cardEl[0].offsetTop - $cardEl.parents('.page-content')[0].scrollTop;
}
} else {
cardLeftOffset = offset.left;
cardTopOffset = offset.top - $pageEl.offset().top;
Expand Down Expand Up @@ -290,6 +304,9 @@ const CardExpandable = {
let $toolbarEl;

let $backropEl;
if ($cardEl.attr('data-backdrop-el')) {
$backropEl = $($cardEl.attr('data-backdrop-el'));
}
if (app.params.card.backrop) {
$backropEl = $cardEl.parents('.page-content').find('.card-backdrop');
}
Expand Down Expand Up @@ -317,7 +334,6 @@ const CardExpandable = {
}
$pageEl.removeClass('page-with-card-opened');


if ($backropEl && $backropEl.length) {
$backropEl.removeClass('card-backdrop-in').addClass('card-backdrop-out');
}
Expand Down
Loading

0 comments on commit 268e6c6

Please sign in to comment.