Skip to content

Commit

Permalink
Merge pull request #833 from kossebau/fixEnabledHyperlinkToolsWithoutDoc
Browse files Browse the repository at this point in the history
Fix wrongly enabled hyperlink tools without a document loaded
  • Loading branch information
Friedrich committed Sep 24, 2014
2 parents f98e30c + a68442d commit b9044f8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
14 changes: 14 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Changes between 0.5.4 and 0.5.5

## WebODF



## Wodo.TextEditor
See also section about WebODF

### Fixes

* Fix wrongly enabled hyperlink tools with no document loaded ([#833](https://github.com/kogmbh/WebODF/pull/833))


# Changes between 0.5.3 and 0.5.4

## WebODF
Expand Down
4 changes: 2 additions & 2 deletions programs/editor/widgets/editHyperlinks.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ define("webodf/editor/widgets/editHyperlinks", [

function updateHyperlinkButtons() {
var controllerEnabled = hyperlinkController && hyperlinkController.isEnabled(),
linksInSelection = controllerEnabled && editorSession.getSelectedHyperlinks();
linksInSelection;

// Enable to disable all widgets initially
widget.children.forEach(function (element) {
element.set('disabled', controllerEnabled === false, false);
element.set('disabled', controllerEnabled !== true, false);
});
if (controllerEnabled) {
// Specifically enable the remove hyperlink button only if there are links in the current selection
Expand Down

0 comments on commit b9044f8

Please sign in to comment.