Opened 13 years ago

Closed 11 years ago

#2902 closed defect (duplicate)

notebook -- resize of cell should also fire on paste into the cell

Reported by: was Owned by: boothby
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: notebook Keywords:
Cc: was, mpatel Merged in:
Authors: Tim Dumol Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

When you paste into a cell it should resize as a result.

Attachments (1)

trac_2902-paste-resize.patch (1.2 KB) - added by timdumol 11 years ago.
Sets onpaste handler to resize cells.

Download all attachments as: .zip

Change History (15)

comment:1 Changed 13 years ago by boothby

This isn't an "easy" problem, but it looks this should do the trick.

Changed 11 years ago by timdumol

Sets onpaste handler to resize cells.

comment:2 Changed 11 years ago by timdumol

  • Authors set to Tim Dumol
  • Cc was mpatel added

This patch should fix it. I don't know how to test this in Selenium (C-C is not always copy, and same with C-V (e.g., mine are C-Z C-C and C-Z C-V)).

comment:3 Changed 11 years ago by timdumol

  • Status changed from new to needs_review

comment:4 follow-up: Changed 11 years ago by timdumol

Oh, depends on #7433.

comment:5 in reply to: ↑ 4 Changed 11 years ago by timdumol

Replying to timdumol:

Oh, depends on #7433.

Nevermind. It doesn't.

comment:6 Changed 11 years ago by boothby

That will not work on cells that are created after the page loads.

comment:7 Changed 11 years ago by mpatel

Would any of the "auto-grow" plug-ins mentioned here help? I'll email preliminary patches for two of them to timdumol, in case they're useful. Unfortunately, I can't work on either ticket right now.

On the plug-ins: I think at least one of them uses a resizing strategy similar to the notebook's. At least one uses a different strategy. But the two I tried both have their quirks, discussed (and possibly fixed) in the comments on their pages.

comment:8 Changed 11 years ago by mpatel

Ticket #7201 is related.

comment:9 Changed 11 years ago by was

  • Report Upstream set to N/A

ISSUES:

1.

That will not work on cells that are created after the page loads.

Indeed. I don't think this patch should go in with that major shortcoming. Can we just set the onpaste handler for all worksheet cells whenever they are created?

  1. I just tried pasting text into both firefox and safari cells and they *already* do resize. So is this whole ticket just invalid? Maybe no patch is needed at all anyways? That matches with my memory, which is that Tom and I fixed this problem a year ago or so by rewriting the textarea resize code.

comment:10 Changed 11 years ago by was

  • Status changed from needs_review to needs_work

comment:11 follow-up: Changed 11 years ago by mpatel

In FF 3.5.5 on Linux, the cells do not resize on paste. V16 at #6855 includes a fix that seems to work. I'll try to check other browser-OS combinations.

comment:12 in reply to: ↑ 11 Changed 11 years ago by was

Replying to mpatel:

In FF 3.5.5 on Linux, the cells do not resize on paste. V16 at #6855 includes a fix that seems to work. I'll try to check other browser-OS combinations.

Good point that I should remark that I was testing with FF 3.5.5 on OS X.

-- William

comment:13 Changed 11 years ago by mpatel

  • Work issues set to Close with #7666

#7666 subsumes this ticket. Please close this ticket when that one merges.

comment:14 Changed 11 years ago by timdumol

  • Milestone changed from sage-4.3.1 to sage-duplicate/invalid/wontfix
  • Resolution set to duplicate
  • Status changed from needs_work to closed
  • Work issues Close with #7666 deleted

Fixed with #7666 (sagenb-0.6)

Note: See TracTickets for help on using tickets.