diff --git a/apps/common/embed/lib/util/utils.js b/apps/common/embed/lib/util/utils.js index 2d275b85e..955320044 100644 --- a/apps/common/embed/lib/util/utils.js +++ b/apps/common/embed/lib/util/utils.js @@ -36,6 +36,11 @@ !common.utils && (common.utils = {}); common.utils = new(function(){ + var userAgent = navigator.userAgent.toLowerCase(), + check = function(regex){ + return regex.test(userAgent); + }, + isMac = check(/macintosh|mac os x/); return { openLink: function(url) { if (url) { @@ -100,7 +105,9 @@ return prop; } } - } + }, + + isMac : isMac }; })(); }(); diff --git a/apps/common/embed/lib/view/SearchBar.js b/apps/common/embed/lib/view/SearchBar.js index 7800e132b..abb0b94da 100644 --- a/apps/common/embed/lib/view/SearchBar.js +++ b/apps/common/embed/lib/view/SearchBar.js @@ -66,9 +66,9 @@ common.view.SearchBar = new(function() { }, disableNavButtons: function (resultNumber, allResults) { - var disable = $('#search-bar-text').val() === ''; - $('#search-bar-back').attr({disabled: disable || !allResults || resultNumber === 0}); - $('#search-bar-next').attr({disabled: disable || resultNumber + 1 === allResults}); + var disable = $('#search-bar-text').val() === '' || !allResults; + $('#search-bar-back').attr({disabled: disable}); + $('#search-bar-next').attr({disabled: disable}); }, textFind: 'Find' diff --git a/apps/common/forms/resources/less/common.less b/apps/common/forms/resources/less/common.less index f303d3142..17545a3e6 100644 --- a/apps/common/forms/resources/less/common.less +++ b/apps/common/forms/resources/less/common.less @@ -546,15 +546,15 @@ } &.search-close { background-position: -@icon-width*18 0; - } - &.search { - background-position: -@icon-width*24 0; + background-position: -@icon-width*18 @icon-normal-top; } &.search-arrow-up { background-position: -@icon-width*27 0; + background-position: -@icon-width*27 @icon-normal-top; } &.search-arrow-down { background-position: -@icon-width*28 0; + background-position: -@icon-width*28 @icon-normal-top; } } diff --git a/apps/common/main/lib/component/ComboBox.js b/apps/common/main/lib/component/ComboBox.js index 74bc96275..63e7a524c 100644 --- a/apps/common/main/lib/component/ComboBox.js +++ b/apps/common/main/lib/component/ComboBox.js @@ -358,6 +358,9 @@ define([ Common.NotificationCenter.trigger('menu:hide', this, isFromInputControl); if (this.options.takeFocusOnClose) { var me = this; + (me._input && me._input.length>0 && !me.editable) && (me._input[0].selectionStart===me._input[0].selectionEnd) && setTimeout(function() { + me._input[0].selectionStart = me._input[0].selectionEnd = 0; + },1); setTimeout(function(){me.focus();}, 1); } }, diff --git a/apps/common/main/lib/component/MenuItem.js b/apps/common/main/lib/component/MenuItem.js index 96c76d36c..373ca9d99 100644 --- a/apps/common/main/lib/component/MenuItem.js +++ b/apps/common/main/lib/component/MenuItem.js @@ -301,6 +301,7 @@ define([ }, onItemMouseDown: function(e) { + Common.UI.HintManager && Common.UI.HintManager.clearHints(); if (e.which != 1) { e.preventDefault(); e.stopPropagation(); diff --git a/apps/common/main/lib/component/Mixtbar.js b/apps/common/main/lib/component/Mixtbar.js index 9b452c354..c1e6c29f8 100644 --- a/apps/common/main/lib/component/Mixtbar.js +++ b/apps/common/main/lib/component/Mixtbar.js @@ -503,7 +503,8 @@ define([ setMoreButton: function(tab, panel) { var me = this; if (!btnsMore[tab]) { - var box = $('