Opened 10 years ago

Closed 3 years ago

#1560 closed enhancement (fixed)

TableOperations: define a dblclickList action for tables

Reported by: ejucovy Owned by:
Priority: normal Milestone: 0.97
Component: Plugins Version: trunk
Severity: normal Keywords:


The TableOperations plugin could define a dblclickList action for table (or maybe td, I'm not sure which would be better) which would open up its "edit table properties" dialog.

(Original discussion for this feature was at and following comments)

Change History (5)

comment:1 Changed 10 years ago by ejucovy

  • Resolution set to fixed
  • Status changed from new to closed


I registered the action for td, not table -- the dblclickList feature doesn't walk up the tree, it only looks at the nearest tag of the dblclick'ed spot. It's possible to *select* a tr, tbody or table, but I don't think it's possible to *click* any of those (because you're always going to be clicking on a specific point, which will be inside one of the cells) so td is the right thing to register for.

(Well, maybe it's possible to click elsewhere on a table with very large borders or padding?)

I'm not sure what will happen if the user registers a dblclickList action for td in his configuration -- one will clobber the other, but I'm not sure which will win. This isn't ideal, but I think it's good enough for now. (The alternative is putting in a lot of logic to detect whether any actions already exist for td, which still won't cover all cases.) In the future, maybe there can some way to fix this, but it seems like a bigger project that will need some thought.

comment:2 Changed 10 years ago by gogo

Handling <th> in the same way also would seem logical.

comment:3 Changed 10 years ago by ejucovy

  • Resolution fixed deleted
  • Status changed from closed to reopened

Good point. I'll reopen.

comment:4 Changed 3 years ago by gogo

In commit [1382] I made this configurable (config.TableOperations?.dblClickOpenTableProperties) and defaulted to false.

The reason is that the behaviour was a bit unpleasant in my opinion, double-clicking to select a word is a common action, but with this turned on if you do that, the table properties opens.

Anyway, it's a config option.

comment:5 Changed 3 years ago by gogo

  • Resolution set to fixed
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.