This repository was archived by the owner on Mar 9, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 9 files changed +12
-10
lines changed
react/table-app/text-cell-edit Expand file tree Collapse file tree 9 files changed +12
-10
lines changed Original file line number Diff line number Diff line change 77 "authorUrl" : " https://github.com/trey-wallis" ,
88 "isDesktopOnly" : false ,
99 "fundingUrl" : " https://www.buymeacoffee.com/treywallis" ,
10- "version" : " 6.14.4 "
10+ "version" : " 6.14.5 "
1111}
Original file line number Diff line number Diff line change 11{
22 "name" : " obsidian-notion-like-tables" ,
3- "version" : " 6.14.4 " ,
3+ "version" : " 6.14.5 " ,
44 "description" : " Notion-like tables for Obsidian.md" ,
55 "main" : " main.js" ,
66 "scripts" : {
Original file line number Diff line number Diff line change 1- export const CURRENT_PLUGIN_VERSION = "6.14.4 " ;
1+ export const CURRENT_PLUGIN_VERSION = "6.14.5 " ;
22
33export const DEFAULT_TABLE_NAME = "Untitled" ;
44
Original file line number Diff line number Diff line change @@ -87,6 +87,7 @@ class NLTEmbeddedPlugin implements PluginValue {
8787 } ) ;
8888 containerEl . addEventListener ( "click" , ( e ) => {
8989 e . stopPropagation ( ) ;
90+ console . log ( "Click event" ) ;
9091 eventSystem . dispatchEvent ( "click" , e ) ;
9192 } ) ;
9293
Original file line number Diff line number Diff line change @@ -114,8 +114,6 @@ export class NLTView extends TextFileView {
114114 } ;
115115
116116 private handleSaveTableState = ( appId : string , state : TableState ) => {
117- //REMOVE, just for testing
118- if ( Platform . isAndroidApp ) return ;
119117 //We need this for when we open a new tab of the same file
120118 //so that the data is up to date
121119 const serialized = serializeTableState ( state ) ;
Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ export default function TextCellEdit({
4949 if ( e . key === "Enter" ) {
5050 if ( isSpecialActionDown ( e ) ) return ;
5151 e . preventDefault ( ) ;
52+ console . log ( "prevent default 3" ) ;
5253 } else if ( e . key === "ArrowLeft" || e . key === "ArrowRight" ) {
5354 const cursorPosition = el . selectionStart ;
5455
Original file line number Diff line number Diff line change @@ -10,8 +10,10 @@ export const useEventSystem = () => {
1010
1111 React . useEffect ( ( ) => {
1212 function handleKeyDown ( e : KeyboardEvent ) {
13- if ( isEventForThisApp ( appId ) )
13+ if ( isEventForThisApp ( appId ) ) {
14+ console . log ( "dispatching event" ) ;
1415 eventSystem . dispatchEvent ( "keydown" , e ) ;
16+ }
1517 }
1618 document . addEventListener ( "keydown" , handleKeyDown ) ;
1719 return ( ) => document . removeEventListener ( "keydown" , handleKeyDown ) ;
Original file line number Diff line number Diff line change @@ -189,13 +189,13 @@ export default function MenuProvider({ children }: Props) {
189189 }
190190
191191 function handleEnterDown ( e : KeyboardEvent ) {
192- console . log ( "ENTER DOWN" ) ;
193192 const target = e . target as HTMLElement ;
194193
195194 if ( isSpecialActionDown ( e ) ) return ;
196195
197196 //Prevents the event key from triggering the click event
198197 if ( target . getAttribute ( "data-menu-id" ) !== null ) {
198+ console . log ( "Prevent default 2" ) ;
199199 e . preventDefault ( ) ;
200200 }
201201
@@ -221,9 +221,9 @@ export default function MenuProvider({ children }: Props) {
221221 }
222222
223223 function handleTabDown ( e : KeyboardEvent ) {
224- console . log ( "TAB DOWN" ) ;
225224 if ( isMenuOpen ( ) ) {
226225 // Disallow the default event which will change focus to the next element
226+ console . log ( "prevent default 1" ) ;
227227 e . preventDefault ( ) ;
228228 } else {
229229 removeFocusVisibleClass ( ) ;
@@ -289,7 +289,6 @@ export default function MenuProvider({ children }: Props) {
289289 }
290290
291291 function handleKeyDown ( e : KeyboardEvent ) {
292- console . log ( e . code ) ;
293292 switch ( e . code ) {
294293 case "Enter" :
295294 handleEnterDown ( e ) ;
Original file line number Diff line number Diff line change 9696 "6.14.1" : " 0.15.0" ,
9797 "6.14.2" : " 0.15.0" ,
9898 "6.14.3" : " 0.15.0" ,
99- "6.14.4" : " 0.15.0"
99+ "6.14.4" : " 0.15.0" ,
100+ "6.14.5" : " 0.15.0"
100101}
You can’t perform that action at this time.
0 commit comments