Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

Commit

Permalink
fix(no fullscreen bug): when no fullscreen , div go to top
Browse files Browse the repository at this point in the history
bug fix
  • Loading branch information
DR-Univer committed Aug 3, 2020
1 parent 6236e5e commit 64f7d0e
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 65 deletions.
7 changes: 4 additions & 3 deletions src/controllers/handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import {
ArrayUnique,
showrightclickmenu,
luckysheetactiveCell,
luckysheetContainerFocus,
} from '../utils/util';
import { getSheetIndex, getRangetxt } from '../methods/get';
import {
Expand Down Expand Up @@ -867,7 +868,7 @@ export default function luckysheetHandler() {
//数据透视表
pivotTable.pivotclick(row_index, col_index, Store.currentSheetIndex);

$("#" + Store.container).attr("tabindex", 0).focus();
luckysheetContainerFocus();

//$("#luckysheet-cols-h-c .luckysheet-cols-h-cells-c .luckysheet-cols-h-cells-clip .luckysheet-cols-h-cell-sel").removeClass("luckysheet-cols-h-cell-sel").addClass("luckysheet-cols-h-cell-nosel");

Expand Down Expand Up @@ -3074,7 +3075,7 @@ export default function luckysheetHandler() {
//底部添加行按钮
$("#luckysheet-bottom-add-row").on("click", function (e) {
$("#luckysheet-rightclick-menu").hide();
$("#" + Store.container).attr("tabindex", 0).focus();
luckysheetContainerFocus();

let $t = $(this), value = $("#luckysheet-bottom-add-row-input").val();

Expand Down Expand Up @@ -3549,7 +3550,7 @@ export default function luckysheetHandler() {
luckysheetMoveHighlightCell("down", 0, "rangeOfSelect");
}

$("#" + Store.container).attr("tabindex", 0).focus();
luckysheetContainerFocus();
});


Expand Down
38 changes: 19 additions & 19 deletions src/controllers/matrixOperation.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import selection from './selection';
import {
numFormat,
numFormat,luckysheetContainerFocus,
} from '../utils/util';
import { hasPartMC, isEditMode } from '../global/validate';
import { getdatabyselection, getcellvalue } from '../global/getdata';
Expand All @@ -13,7 +13,7 @@ export function initialMatrixOperation(){
//复制为json格式字符串,首行为标题
$("#luckysheet-copy-json-head").click(function (event) {
$("body .luckysheet-cols-menu").hide();
$("#" + Store.container).attr("tabindex", 0).focus();
luckysheetContainerFocus();

if(Store.luckysheet_select_save.length > 1){
if(isEditMode()){
Expand Down Expand Up @@ -86,7 +86,7 @@ export function initialMatrixOperation(){
//复制为json格式字符串,无标题,采用ABCD作为标题
$("#luckysheet-copy-json-nohead").click(function (event) {
$("body .luckysheet-cols-menu").hide();
$("#" + Store.container).attr("tabindex", 0).focus();
luckysheetContainerFocus();


if(Store.luckysheet_select_save.length > 1){
Expand Down Expand Up @@ -147,7 +147,7 @@ export function initialMatrixOperation(){
//复制为一维数组
$("#luckysheet-copy-array1").click(function (event) {
$("body .luckysheet-cols-menu").hide();
$("#" + Store.container).attr("tabindex", 0).focus();
luckysheetContainerFocus();

if(Store.luckysheet_select_save.length > 1){
if(isEditMode()){
Expand Down Expand Up @@ -204,7 +204,7 @@ export function initialMatrixOperation(){
//复制为二维数组
$("#luckysheet-copy-array2").click(function (event) {
$("body .luckysheet-cols-menu").hide();
$("#" + Store.container).attr("tabindex", 0).focus();
luckysheetContainerFocus();


if(Store.luckysheet_select_save.length > 1){
Expand Down Expand Up @@ -383,7 +383,7 @@ export function initialMatrixOperation(){
//复制为对角线
$("#luckysheet-copy-diagonal").click(function (event) {
$("body .luckysheet-cols-menu").hide();
$("#" + Store.container).attr("tabindex", 0).focus();
luckysheetContainerFocus();

if(Store.luckysheet_select_save.length > 1){
if(isEditMode()){
Expand Down Expand Up @@ -443,7 +443,7 @@ export function initialMatrixOperation(){
//复制为反对角线
$("#luckysheet-copy-antidiagonal").click(function (event) {
$("body .luckysheet-cols-menu").hide();
$("#" + Store.container).attr("tabindex", 0).focus();
luckysheetContainerFocus();


if(Store.luckysheet_select_save.length > 1){
Expand Down Expand Up @@ -504,7 +504,7 @@ export function initialMatrixOperation(){
//复制为对角偏移n列
$("#luckysheet-copy-diagonaloffset").click(function (event) {
$("body .luckysheet-cols-menu").hide();
$("#" + Store.container).attr("tabindex", 0).focus();
luckysheetContainerFocus();

if(Store.luckysheet_select_save.length > 1){
if(isEditMode()){
Expand Down Expand Up @@ -590,7 +590,7 @@ export function initialMatrixOperation(){
//复制为布尔值
$("#luckysheet-copy-boolvalue").click(function (event) {
$("body .luckysheet-cols-menu").hide();
$("#" + Store.container).attr("tabindex", 0).focus();
luckysheetContainerFocus();


if(Store.luckysheet_select_save.length > 1){
Expand Down Expand Up @@ -671,7 +671,7 @@ export function initialMatrixOperation(){
//矩阵操作选区 翻转 上下
$("#luckysheet-matrix-turn-up").click(function (event) {
$("body .luckysheet-cols-menu").hide();
$("#" + Store.container).attr("tabindex", 0).focus();
luckysheetContainerFocus();

if(Store.luckysheet_select_save.length > 1){
if(isEditMode()){
Expand Down Expand Up @@ -707,7 +707,7 @@ export function initialMatrixOperation(){
//矩阵操作选区 翻转 左右
$("#luckysheet-matrix-turn-left").click(function (event) {
$("body .luckysheet-cols-menu").hide();
$("#" + Store.container).attr("tabindex", 0).focus();
luckysheetContainerFocus();

if(Store.luckysheet_select_save.length > 1){
if(isEditMode()){
Expand Down Expand Up @@ -743,7 +743,7 @@ export function initialMatrixOperation(){
//矩阵操作选区 翻转 顺时针
$("#luckysheet-matrix-turn-cw").click(function (event) {
$("body .luckysheet-cols-menu").hide();
$("#" + Store.container).attr("tabindex", 0).focus();
luckysheetContainerFocus();

if(Store.luckysheet_select_save.length > 1){
if(isEditMode()){
Expand Down Expand Up @@ -779,7 +779,7 @@ export function initialMatrixOperation(){
//矩阵操作选区 翻转 逆时针
$("#luckysheet-matrix-turn-anticw").click(function (event) {
$("body .luckysheet-cols-menu").hide();
$("#" + Store.container).attr("tabindex", 0).focus();
luckysheetContainerFocus();

if(Store.luckysheet_select_save.length > 1){
if(isEditMode()){
Expand Down Expand Up @@ -815,7 +815,7 @@ export function initialMatrixOperation(){
//矩阵操作选区 转置
$("#luckysheet-matrix-turn-trans").click(function (event) {
$("body .luckysheet-cols-menu").hide();
$("#" + Store.container).attr("tabindex", 0).focus();
luckysheetContainerFocus();

if(Store.luckysheet_select_save.length > 1){
if(isEditMode()){
Expand Down Expand Up @@ -864,7 +864,7 @@ export function initialMatrixOperation(){
//矩阵操作选区 矩阵计算
$("#luckysheet-matrix-cal-confirm").click(function (event) {
$("body .luckysheet-cols-menu").hide();
$("#" + Store.container).attr("tabindex", 0).focus();
luckysheetContainerFocus();

if(Store.luckysheet_select_save.length > 1){
if(isEditMode()){
Expand Down Expand Up @@ -957,7 +957,7 @@ export function initialMatrixOperation(){
//矩阵操作选区 删除两端0值 按行
$("#luckysheet-matrix-delezero-row").click(function (event) {
$("body .luckysheet-cols-menu").hide();
$("#" + Store.container).attr("tabindex", 0).focus();
luckysheetContainerFocus();

if(Store.luckysheet_select_save.length > 1){
if(isEditMode()){
Expand Down Expand Up @@ -1025,7 +1025,7 @@ export function initialMatrixOperation(){
//矩阵操作选区 删除两端0值 按列
$("#luckysheet-matrix-delezero-column").click(function (event) {
$("body .luckysheet-cols-menu").hide();
$("#" + Store.container).attr("tabindex", 0).focus();
luckysheetContainerFocus();

if(Store.luckysheet_select_save.length > 1){
if(isEditMode()){
Expand Down Expand Up @@ -1106,7 +1106,7 @@ export function initialMatrixOperation(){
//矩阵操作选区 删除重复值 按行
$("#luckysheet-matrix-delerpt-row").click(function (event) {
$("body .luckysheet-cols-menu").hide();
$("#" + Store.container).attr("tabindex", 0).focus();
luckysheetContainerFocus();

if(Store.luckysheet_select_save.length > 1){
if(isEditMode()){
Expand Down Expand Up @@ -1167,7 +1167,7 @@ export function initialMatrixOperation(){
//矩阵操作选区 删除重复值 按列
$("#luckysheet-matrix-delerpt-column").click(function (event) {
$("body .luckysheet-cols-menu").hide();
$("#" + Store.container).attr("tabindex", 0).focus();
luckysheetContainerFocus();

if(Store.luckysheet_select_save.length > 1){
if(isEditMode()){
Expand Down
Loading

0 comments on commit 64f7d0e

Please sign in to comment.