Skip to content
This repository has been archived by the owner on Jul 24, 2019. It is now read-only.

TAB doesn't work on Firefox #26

Open
harvimt opened this issue Nov 11, 2015 · 5 comments
Open

TAB doesn't work on Firefox #26

harvimt opened this issue Nov 11, 2015 · 5 comments

Comments

@harvimt
Copy link

harvimt commented Nov 11, 2015

pressing TAB when the editor is open, opens the cell to the right in chrome, but not firefox on mac.
in firefox pressing tab just results in the cell losing focus. (often going to the url bar)

@harvimt
Copy link
Author

harvimt commented Nov 11, 2015

fixed with:

diff --git a/public/js/mindmup-editabletable.js b/public/js/mindmup-editabletable.js
index 36be540..9aec7c0 100755
--- a/public/js/mindmup-editabletable.js
+++ b/public/js/mindmup-editabletable.js
@@ -70,7 +70,10 @@ $.fn.editableTableWidget = function (options) {
                editor.hide();
                active.focus();
            } else if (e.which === TAB) {
-               active.focus();
+               e.preventDefault();
+               e.stopPropagation();
+               editor.hide();
+               active.next('td').focus().click();
            } else if (this.selectionEnd - this.selectionStart === this.value.length) {
                var possibleMove = movement(active, e.which);
                if (possibleMove.length > 0) {
``

@ermanimer
Copy link

after this fix, tab works but doesn't passes to next row.

@hydrogen2oxygen
Copy link

hydrogen2oxygen commented Aug 13, 2016

This worked for me:

else if (e.which === TAB) {

            e.preventDefault();
            e.stopPropagation();

            if (active.next('td').length == 0) {
                active.closest('tr').next().find('td:first-child').focus().click();
            } else {
                active.next('td').focus().click();
            }
        }

@DRSDavidSoft
Copy link

Would the author (@mindmup) fix this issue with the #32 PR already...

@loki0609
Copy link

loki0609 commented Sep 7, 2018

active.closest('tr').next().find('td:first-child').focus().click(); didn't work for me on firefox
this did however
active.closest('tr').next().find('td').first().focus().click();

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants