Whenever i try to select line of text that is longer and i need to scroll to right to select it Sublime text scrolls back to left.
I tried deleting all plugins but it looks like a default sublime text behavior.
Does this happen to everyone else and can this be changed?
This doesn't happen to me. Selecting and scrolling over keeps me on the right. You can also put your cursor at the front of the line, hold shift and hit the end key. You should be on the right with the line highlighted.
Extra: If you want to highlight a line and stay on the left, triple click the line.
Related
CodeSandbox: https://codesandbox.io/s/charming-banach-tvdeu
Problem
I need to use multiple content-editable on my page. One below each other. They work just fine except when I onBlur the div by clicking outside the div.
Steps to reproduce the bug
First bug
Focus on the first content-editable of either the first or second container
Put the cursor on one-hand side (beginning or end)
Click outside the content-editable on the opposite side of the cursor but still on the same line has the div
==> The content-editable doesn't blur. It first move the cursor to the very end side of the content and a second click is needed for the div to blur
Second bug
Focus on the first content-editable of either the first or second container
Put the cursor on one-hand side (begining or end)
Click outside the content-editable but on the same line as the second content-editable of the same container
==> The second content-editable focus and a second click is needed for the div to blur
If the click happens on a different container it works fine.
I also tried to implement the fix from this topic https://stackoverflow.com/a/34445203 but the zero width space has a height I can't remove.
I dont know what the technical term for this is but I decided to use the term "Ghost Marks" to describe it. This is done using Chrome.
Using Bootstrap I have two tabs. There is more content in the first tab so the container is longer than the second tab. Outside (below) the tabs container there is another div with some text and a green button.
Sometimes when I click between the two tabs "Ghost Marks" of the div outside the container are left on the page. This is occurring because when I switch from the larger tab to the smaller tab the div outside the container moves up the page leaving marks as it goes along.
Here is an example of what it looks like:
It has something to do with the way chrome paints the HTML. If I press F12 the Ghost marks disappear.
I could make the 2nd tabs container the same height as the first tabs container but that would leave a lot of white space.
Any ideas how to make sure this doesn't happen?
I'm creating a footer on my report, with 3 boxes. One on the left side, the second one in the middle and the last one on the right side.
The left box and right box are appearing on each page, respectively with the timestamp info for the left box and for the number of pages for the right box.
Middle box is appearing , at the last page of the report only.
I've put the following line for my middle box
iif(Globals!PageNumber = Globals!TotalPages, False, True)
The script says the middle box will only appear at the last page of the report
Last page is fine. Three boxes, standing side by side.
Issue lies from the first page to the penultimate page.
As the middle box does not appear until the last page, the right box is shifting to the left side , taking over the place where the middle box should be.
I tried to fix this issue, by putting all the boxes in a rectangle. Alas no good news
I set the option Keep Together = True but I don't think it will help. I keep looking for a solution.
Any insights you may have , are more than welcome
Cheers
Update :
This is my last page
My second page to my penultimate page look like this
I want the third box to be on the extreme right side , like on my last page
If I'm interpreting your question correctly, then the middle textbox has the following two properties set:
Visibility (hidden): =IIF(Globals!PageNumber = Globals!TotalPages, False, True)
The value is : "13779..." or some expression evaluating to this.
Try changing these properties to the following:
Visibility(hidden): False
Then
Value: =IIF(Globals!PageNumber <> Globals!TotalPages, Nothing, "13779...")
This way you are not hiding the textbox itself, just the text that it displays. Doing so should cause the textbox to align the same horizontally on all pages.
For the rightmost box make the right align the text.
Either by clicking on the menubar
OR
Change the textbox property TextAlign to Right
Another method will be to write an expression in Left padding for the rightmost text box.
Something Like
=iif(Globals!PageNumber = Globals!TotalPages, '2pt', '220pt')
In the image below, my code is on the left and my output is on the right. In the div, I allowed for y-overflow only, and set x-overflow to hidden, and replaced x-overflow with elipses. As you can see, I was able to achieve this result in the output box.
However, If I click in the output box div and highlight the text say the "dddd..." part, and drag to the right, I can see all this empty space to the right of the elipses. That is, I can highlight text and drag, to see the white-space overflow in the div. Is there a way to prevent this from occuring?
The reason I can "highlight" the text within the box and "drag" it to the right to see the "x-overflow" is because I was using the browser google chrome. For some reason when I use the browser "firefox" the problem disappears.
(If anyone can suggest how to fix the problem in chrome please post an answer.)
I'm having these troubles since almost 2 full days now and see this as my last chance to get a neat solution of my 2-page-editor before giving up.
Please use Firefox first and have a look at:
http://twopageeditor.bastianschulz.com/
STEPS:
set the caret into the last row "Exiles, similes, and reviles;"
press the "down arrow" key
RESULT: the caret is in the first row on page 2
Short explaination about the implementation:
- The editor contains two separate contenteditable DIV elements.
- In case of leaving a page by moving with the cursor within an contenteditable DIV element, we just swap the places and positions of the DIV elements but the caret stays in the same DIV element. The page 2 which is on the left side, is still the same DIV element that was on the right side when we were still on page 1.
- When changes to the text are done, the unselected DIV element is blurred out because it might be out-of-date. When the selected DIV element is deselected again, its content is fully copied into the other DIV element so that all changes that have been done are kept and therefore synchronized with the other DIV element.
Now use Chrome or Safari (IE not at all, that will be my next issue...)
STEPS:
set the caret into the last row "Exiles, similes, and reviles;"
press the "down arrow" key
RESULT: the caret is in the first row 1 on page 2
BUT: this row is not visible. Press down arrow key again and it appears in the second row of page 2. When you press the arrow up key now, the content moves again, the caret is in row 1 and page 2 is displayed as it should (and like Firefox does it correctly).
REASON: right after you pressed the down arrow key on the first page you will see for a part of a second that content in this DIV is automatically scrolled by the browser so that the position of the caret is still visible. This causes a displacement of the DIV element by 20px of its CSS top attribute. When setting thereafter the new absolute value of top:-520px e.g. (the height of the page / viewport is 520px) this weird shifting of 20px is still there.
I haven't figured out a way how to stop this automatic scrolling of the content when its not visible anymore. Or at least to be able to kind of reset the contenteditable DIV back to its normal state.
Anyone ideas?
Cheers!