File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -37,9 +37,10 @@ const doLoadChildren = async () => {
3737};
3838
3939const onItemClick = (e : MouseEvent ) => {
40- // only handle the click event with page partial reloading if the user didn't press any special key
41- // let browsers handle special keys like "Ctrl+Click"
42- if (! isPlainClick (e )) return ;
40+ // only handle the click event with partial page reloading if both
41+ // - the user didn't press any special key like "Ctrl+Click" (which may have custom browser behavior)
42+ // - the editor/commit form isn't dirty (a full page reload shows a confirmation dialog if the form contains unsaved changes)
43+ if (! isPlainClick (e ) || document .querySelector (' .repo-view-content .form.dirty' )) return ;
4344 e .preventDefault ();
4445 if (props .item .entryMode === ' tree' ) doLoadChildren ();
4546 store .navigateTreeView (props .item .fullPath );
You can’t perform that action at this time.
0 commit comments