Skip to content

Commit

Permalink
Merge pull request #2986 from ONLYOFFICE/fix/fix-bugs
Browse files Browse the repository at this point in the history
[common] Fix bug 67538
  • Loading branch information
JuliaRadzhabova authored May 8, 2024
2 parents 901b416 + 84a9e74 commit cd0b376
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions apps/common/main/lib/component/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -960,14 +960,14 @@ define([
me.options.scaling = ratio;

if (ratio > 2) {
if (!me.$el.find('svg.icon').length) {
const iconCls = me.iconCls || me.$el.find('i.icon').attr('class');
const $el = me.$el.is('button') ? me.$el : me.$el.find('button:first');
if (!$el.find('svg.icon').length) {
const iconCls = me.iconCls || $el.find('i.icon').attr('class');
const re_icon_name = /btn-[^\s]+/.exec(iconCls);
const icon_name = re_icon_name ? re_icon_name[0] : "null";
const rtlCls = (iconCls ? iconCls.indexOf('icon-rtl') : -1) > -1 ? 'icon-rtl' : '';
const svg_icon = '<svg class="icon %rtlCls"><use class="zoom-int" href="#%iconname"></use></svg>'.replace('%iconname', icon_name).replace('%rtlCls', rtlCls);

me.$el.find('i.icon').after(svg_icon);
$el.find('i.icon').after(svg_icon);
}
} else {
if (!me.$el.find('i.icon')) {
Expand Down

0 comments on commit cd0b376

Please sign in to comment.